This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dom.spec.whatwg.org/#dispatching-events When invoking event listeners: [[ Call listener's callback's handleEvent, with the event passed to this algorithm as the first argument and event's currentTarget attribute value as callback this value. ]] We should probably not do this if the event handler's Document is not an active document, right? Does that belong in DOM?
(We should probably test what browsers do.)
This might be of interest to you: https://groups.google.com/a/chromium.org/d/topic/blink-dev/QHnejis4Yv4/discussion Also, Morrita-san is landing this right now in Blink.
Dispatching events doesn't depend on whether or not the document is active or data document. Also just dispatching events in a disconnected subtree should work. In Gecko event listeners do work, but event handlers in data documents aren't registered.
Dimitri, that's not about document being active, but about whether it has an associated browsing context. I think what Olli says is correct, though creating test cases for inactive documents is hard. That's basically only documents you have navigated away from, right?
Oh, active still... so Gecko doesn't end up calling listeners or handlers on a document which isn't "active", for example is in bfcache.
But I've always thought that is an implementation limitation, a bug, in Gecko.