1,295
edits
Line 39: | Line 39: | ||
New methods of Document: | New methods of Document: | ||
* void | * void cancelFullScreen() | ||
Requests that the UA exit fullscreen mode. The UA is not required to honor this, for example the UA might require that only a Document that last triggered fullscreen can cancel it. | |||
The current fullscreen element for the document is cleared. | |||
New attributes of Element: | |||
* | * const unsigned short ALLOW_KEYBOARD_INPUT = 1 | ||
New methods of Element: | |||
* void requestFullScreen(unsigned short flags) | |||
The current fullscreen element for the document is set to this element. | |||
Typically the user agent would react by transitioning the Document to the fullscreen state, or by presenting asynchronous confirmation UI and transitioning to the fullscreen state if/when the user responds affirmatively. However, the user agent is not required to do anything at all in response to requestFullScreen. | |||
When the ALLOW_KEYBOARD_INPUT flag is not specified, requestFullScreen hints to the UA that while in fullscreen state, the toplevel browsing context for this Document should have keys disabled. While keys are disabled, there may be a reduced risk of spoofing attacks inducing the user to input inappropriate data, and the UA may choose to relax restrictions on entering fullscreen state with keys disabled. | |||
New DOM attribute of Document: | New DOM attribute of Document: | ||
Line 67: | Line 65: | ||
Returns true while the document is in the fullscreen state. | Returns true while the document is in the fullscreen state. | ||
* readonly attribute boolean | * readonly attribute boolean fullScreenKeyboardInputAllowed | ||
Returns true while the window's toplevel browsing context is fullscreen and not in a "keys disabled" state. | Returns true while the window's toplevel browsing context is fullscreen and not in a "keys disabled" state. | ||
Line 75: | Line 73: | ||
* allowfullscreen | * allowfullscreen | ||
This is a boolean attribute. When this attribute is not set, UAs should ignore fullscreen requests in the iframe or its | This is a boolean attribute. When this attribute is not set, UAs should ignore fullscreen requests in the iframe or its descendant frames. | ||
New events: | New events: | ||
Line 91: | Line 89: | ||
While a Document is in the fullscreen state, and the document's current fullscreen element is an element in the document, the 'full-screen' pseudoclass applies to that element. Also, an <iframe>, <object> or <embed> element whose child browsing context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied. | While a Document is in the fullscreen state, and the document's current fullscreen element is an element in the document, the 'full-screen' pseudoclass applies to that element. Also, an <iframe>, <object> or <embed> element whose child browsing context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied. | ||
* :full-screen- | * :full-screen-document | ||
While a Document is in the fullscreen state | While a Document is in the fullscreen state, the 'full-screen-document' pseudoclass applies to the root element of that Document. | ||
Suggested UA stylesheet rule: | Suggested UA stylesheet rule: | ||
:full-screen { | /* A fullscreen element that is not the root element should be stretched | ||
to cover the viewport. */ | |||
:full-screen:not(:root) { | |||
position:fixed; | position:fixed; | ||
top:0; | top:0; | ||
Line 110: | Line 106: | ||
background:black; | background:black; | ||
} | } | ||
:full-screen- | /* In fullscreen mode, if the root element itself is not fullscreen then | ||
we should hide the viewport scrollbar. */ | |||
:full-screen-document:not(:full-screen) { | |||
overflow:hidden; | overflow:hidden; | ||
} | } |
edits