This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28166 - Should onblur and friends be overridden on HTMLBodyElement or inherited from HTMLElement?
Summary: Should onblur and friends be overridden on HTMLBodyElement or inherited from ...
Status: RESOLVED INVALID
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#the-bod...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-07 18:38 UTC by contributor
Modified: 2015-04-08 15:20 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2015-03-07 18:38:15 UTC
Specification: https://html.spec.whatwg.org/
Multipage: https://html.spec.whatwg.org/multipage/#the-body-element
Complete: https://html.spec.whatwg.org/#the-body-element
Referrer: 

Comment:
Should onblur and friends be overridden on HTMLBodyElement or inherited from
HTMLElement?

Posted from: 14.162.102.1
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 OPR/27.0.1689.76
Comment 1 Philip Jägenstedt 2015-03-07 18:42:06 UTC
HTMLBodyElement and HTMLFrameElement have special behavior for onblur, onerror, onfocus, onload, onresize, and onscroll, but it's not entirely clear what the IDL should look like. The spec says "It also mirrors their event handler IDL attributes" and "with corresponding event handler content attributes and event handler IDL attributes exposed on all body and frameset elements that are owned by that Window object's Documents".

Blink have these attributes on HTMLBodyElement shadowing the ones on HTMLElement (which gets them from GlobalEventHandlers) but this doesn't seem to be per spec? The difference could be observed by which interface object has the attributes (once Blink finishes the conversion to have attributes on the prototype chain at least).
Comment 2 Philip Jägenstedt 2015-03-07 18:45:24 UTC
HTMLFrameSetElement, not HTMLFrameElement.
Comment 3 Ian 'Hixie' Hickson 2015-03-30 22:30:25 UTC
Isn't the spec clear about this? They're inherited, but have different behaviour.
Comment 4 Philip Jägenstedt 2015-04-08 15:20:46 UTC
Oh, I see, "It also mirrors their event handler IDL attributes" is in reference to "HTMLBodyElement implements WindowEventHandlers" and not anything to do with GlobalEventHandlers.

I guessed that the spec IDL was out of sync with the intended behavior here, but clearly not, and I see that Gecko already does the right thing per spec. Sorry for the noise, and I'll add a TODO to fix this in Blink.