1,295
edits
No edit summary |
|||
Line 37: | Line 37: | ||
Each document has an optional "current fullscreen element". | Each document has an optional "current fullscreen element". | ||
New | New method of Document: | ||
* void cancelFullScreen() | * void cancelFullScreen() | ||
Line 44: | Line 44: | ||
The current fullscreen element for the document is cleared. | The current fullscreen element for the document is cleared. | ||
New methods of Element: | New methods of Element: | ||
* void requestFullScreen( | * void requestFullScreen() | ||
The current fullscreen element for the document is set to this element. | The current fullscreen element for the document is set to this element. | ||
Line 57: | Line 53: | ||
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. The user agent's behavior is allowed to vary depending on whether requestFullScreen is called during a user event (e.g. a mouse click handler). | 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. The user agent's behavior is allowed to vary depending on whether requestFullScreen is called during a user event (e.g. a mouse click handler). | ||
* void requestFullScreenWithKeys() | |||
As requestFullScreen, but 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 83: | Line 81: | ||
The 'onfullscreenchange' event handling attribute is supported on HTML elements. | The 'onfullscreenchange' event handling attribute is supported on HTML elements. | ||
New CSS | New CSS psuedoclass: | ||
* :full-screen | * :full-screen | ||
Line 89: | Line 87: | ||
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. | ||
* | New CSS media type: | ||
* fullscreen | |||
While a Document is in the fullscreen state, the | While a Document is in the fullscreen state, the fullscreen media type is active for the document. | ||
Suggested UA stylesheet rule: | Suggested UA stylesheet rule: | ||
Line 108: | Line 108: | ||
/* In fullscreen mode, if the root element itself is not fullscreen then | /* In fullscreen mode, if the root element itself is not fullscreen then | ||
we should hide the viewport scrollbar. */ | we should hide the viewport scrollbar. */ | ||
:root | @media fullscreen { | ||
:root:not(:full-screen) { | |||
overflow:hidden; | |||
} | |||
} | } | ||
edits