concord-consortium/shutterbug — pull request #12 by rklancer (2013-11-13 05:40:16+00:00)
Title: Emit saycheese, asyouwere events. 

In order to allow applications to do any (synchronous) preparation required before they are ready to be snapshotted, this emits a jQuery custom event called 'shutterbug-saycheese' just prior to copying styles, elements, and canvas contents to the document fragment.

After all elements are copied, emits a 'shutterbug-asyouwere' event.

jQuery custom events are used for wide compatibility. Not all browsers support DOM Level 3 custom events.

Fixes #2 for Shutterbug-aware clients if they can re-render their canvas before returning from the 'shutterbug-saycheese' event handler.