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/webappapis.html Multipage: http://www.whatwg.org/C#event-handlers-on-elements,-document-objects,-and-window-objects Complete: http://www.whatwg.org/c#event-handlers-on-elements,-document-objects,-and-window-objects Comment: Should onfullscreen* be on Document too? Posted from: 173.48.81.109 by bzbarsky@mit.edu User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20130108 Firefox/21.0
Per spec, fullscreen events fire on the document, as far as I can tell, then bubble to the window...
A separate question is whether this should just be defined in https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.htm
*** Bug 20636 has been marked as a duplicate of this bug. ***
Happy to spec it however Anne wants it. Anne? (This is in HTML just to keep all the event handler definitions in one place, but I don't really care where things are. In my mind we should really just have one über spec and it's split just because that makes splitting the editing work easier. We don't ship the fullscreen part of the browser separate from the Document object part...)
http://fullscreen.spec.whatwg.org/ is the standard that's maintained. Not any other version. The event only fires on Document. I don't have a preference with regards to which objects on* should be exposed on. I left that to HTML on purpose and agree with Ian that HTML defining all those attributes insofar they are exposed on Window/Document/HTMLElement makes sense.
If the event only fires on Document and doesn't bubble, then there's not much point having the on* content attributes, since they can only catch events on Window and elements. Anne: Where do you want the event handler attributes? I'm happy to spec it, but I don't know where they should be. The options are: 1- on Elements, Documents, and Windows 2- on Elements, Documents, and Windows, with <body> listening to Window 3- on Windows only (and supported as <body> attributes) 4- on Documents only 5- on a specific Element only So for example, 1 is used by onclick, 2 is used by onload, 3 is used by onunload, and 4 is used by onreadystatechange, and 5 is used by onstart. 4 and 5 are very unusual and I recommend against them for consistency. (There's also even more special cases; onerror, onmouseenter, onbeforeunload... these, and some others, are extra special in some way or another that you don't want to copy.)
They do bubble. bubbles is set to true. The target node is only ever Document though. I don't really care where we put the onfullscreen* attributes. Whatever makes the most sense to you works for me. Maybe roc/cpearce have an opinion?
If they are fired on Document bubble to Window, but are never fired on Elements, then option 3 seems like the right one. As far as I can tell that's what the spec says. bz: Can you elaborate on why you want something different, and specifically which of the options in comment 6 it is that you want?
I think we should question why the event bubbles. Is that legacy from when the fullscreen events fired to elements? What utility does it provide? Perhaps this would be cleaner and more direct if the event is fired at the document and does not bubble, thus having event handler attributes only on document.
I now implemented the suggestion from comment 9. I also defined them self-contained in: http://fullscreen.spec.whatwg.org/ HTML will remain in control of <iframe allowfullscreen>, defining when the fullscreen enabled flag is set, and the "fully exit fullscreen" invocation for navigation. Okay?
Checked in as WHATWG revision r7927. Check-in comment: onfullscreen* moved to the fullscreen spec http://html5.org/tools/web-apps-tracker?from=7926&to=7927