tildeio/rsvp.js — pull request #137 by hjdivad (2013-11-26 06:03:08+00:00)
Title: Add instrumentation.

```js function listener (event) {
event.guid // guid of promise
event.childGuid // guid of child promise (for chained via `then`)
event.eventName // one of ['created', 'chained', 'fulfilled',
'rejected']
event.detail // fulfillment value or rejection reason, if applicable
event.label // label passed to promise's constructor
}

RSVP.Promise.on('created', listener); RSVP.Promise.on('chained', listener);
RSVP.Promise.on('fulfilled', listener); RSVP.Promise.on('rejected', listener);
```

Events are only triggered when `RSVP.Promise.instrument` is true, although
listeners can be registered at any time.