sbarman/webscript — pull request #6 by sbarman (2012-10-21 20:02:06+00:00)
Title: Snapshot

So I did a test to check if stopPropation on the page affected the extension, and it does. This prevented us from taking the after snapshot during the bubble phase of the event.

I then though we might be able to set the snapshotAfter by delaying the delivery of the event to the background page until the next event is fired on the same page, but this seems messy. In the end, I think the best approach is just to record the snapshotBefore. If we need a snapshotAfter, it can be found by trying to find the next event on the same page/iframe? Alternatively, we could use some sorta timer to take a snapshot, but this also seems hacky.

Let me know if this solution breaks your code horribly and we can try to think of something more clever.