tildeio/rsvp.js — pull request #181 by teddyzeenny (2013-12-30 19:21:22+00:00)
Title: Queue instrumentation events to assemble them later

Adds an event queue to instrumentation. This allows RSVP to queue events before the assembler is initialised.

Setting `window.__PROMISE_INSPECTION__ = true` before loading RSVP, will tell it to start instrumentation immediately and queue all triggered events.

Once the assembler is initialised (at a later time), and the listeners are set (ex: `RSVP.on('created')`), it is enough to call `RSVP.flushEvents()` and all queued events will be re-triggered.

Setting `RSVP.configure('queueEvents', false)` will stop further events from being queued.

/ cc @stefanpenner