This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/ Multipage: http://www.whatwg.org/C#getting-the-current-value-of-the-event-handler Complete: http://www.whatwg.org/c#getting-the-current-value-of-the-event-handler Referrer: Comment: what if there's no browsing context when you "get the current value of the event handler"? Posted from: 2620:0:1000:167c:84ad:7d24:e50b:d745 by ian@hixie.ch User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.4 Safari/537.36
Set attribute, import node, click: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2672 http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2675 Set attribute, click, import node, click: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2673 http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2674 If I'm interpreting this right: Firefox acts as if it compiled the script in the context of the original document. Chrome fails to compile the script if it's not in a document with a global object.
Yeah, the Firefox behavior here is rather wacky. I don't think we object to changing it. If we do want to always compile the script, using the global that would be used for the JS reflection of the node's ownerDocument would make sense to me. Olli, thoughts?
Yeah, I was planning to change Gecko's behavior even before this bug. (because of https://bugzilla.mozilla.org/show_bug.cgi?id=944847)
Ok so if the event handler is on an Element and the Element's Document has no browsing context, we should just set it to null when we're compiling?
...and keep the uncompiled handler so that if the element is adopted to a document which is in a browsing context the element gets the handler compiled.
Wow, you're not kidding. Thanks for pointing that out, I would never have thought to even check for that. http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2692 http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2693
Checked in as WHATWG revision r8375. Check-in comment: Rearrange requirements for handling internal raw uncompiled handlers http://html5.org/tools/web-apps-tracker?from=8374&to=8375
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2711 http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2714 http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2718 Ok I think the spec now matches what Firefox does on these tests. (Chrome is a little different, e.g. in 2718.)
Checked in as WHATWG revision r8376. Check-in comment: Make content attribute event handlers work slightly more like in more browsers. http://html5.org/tools/web-apps-tracker?from=8375&to=8376