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 20637 - Remove onfullscreen* from HTML
Summary: Remove onfullscreen* from HTML
Status: RESOLVED FIXED
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: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 20636 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-10 17:21 UTC by contributor
Modified: 2013-06-06 21:11 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2013-01-10 17:21:26 UTC
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
Comment 1 Boris Zbarsky 2013-01-10 17:21:57 UTC
Per spec, fullscreen events fire on the document, as far as I can tell, then bubble to the window...
Comment 2 Boris Zbarsky 2013-01-10 17:23:37 UTC
A separate question is whether this should just be defined in https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.htm
Comment 3 Boris Zbarsky 2013-01-10 18:26:02 UTC
*** Bug 20636 has been marked as a duplicate of this bug. ***
Comment 4 Ian 'Hixie' Hickson 2013-01-10 20:49:53 UTC
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...)
Comment 5 Anne 2013-01-10 21:27:57 UTC
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.
Comment 6 Ian 'Hixie' Hickson 2013-03-07 23:29:40 UTC
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.)
Comment 7 Anne 2013-03-08 10:27:05 UTC
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?
Comment 8 Ian 'Hixie' Hickson 2013-03-08 22:16:25 UTC
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?
Comment 9 scheib 2013-04-11 16:57:32 UTC
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.
Comment 10 Anne 2013-05-01 14:28:32 UTC
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?
Comment 11 contributor 2013-06-06 21:11:13 UTC
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