On 7/23/14, 12:02 PM, Allen Wirfs-Brock wrote:
No, synchronous dispatchEvent looks like it could just work depending upon how the browser specific contextual state (origin, etc. scripting settings, etc. in the HTML spec.) is modeled.
It's modeled as "settings objects" (settings records, if you prefer). Mostly. "origin" and "effective script origin" are computed from stuff in the settings record.
If dispatchEvent is going to synchronously dispatch event handlers it may have to do browser context switch for each handler. How does it know to do this?
Web IDL callbacks store the info they need to set up the call.
Perhaps we also need a [[HostDefined]] field in Realm records? (Each function is associated with a realm, so it is a good place to put context that is shared by all functions for a specific realm).
In practice, each Realm has a unique global and the HTML spec ends up hanging its stuff off there as far as I can tell.
-Boris _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

