Changes

Jump to: navigation, search

Gecko:FullScreenAPI

126 bytes removed, 00:31, 6 August 2010
Proposed Specification
New methods of Document:
* void requestFullScreen()* void requestFullScreenWithKeyscancelFullScreen()
Typically the user agent would react by transitioning the Document to the fullscreen state, or by presenting asynchronous confirmation UI and transitioning to Requests that the UA exit fullscreen state if/when the user responds affirmativelymode. However, the user agent The UA is not required to do anything at all in response to requestFullScreen or requestFullScreenWithKeyshonor this, for example the UA might require that only a Document that last triggered fullscreen can cancel it.
requestFullScreen hints to the UA that while in The current fullscreen state, the toplevel browsing context element 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 disableddocument is cleared.
The current fullscreen element for the document is cleared.New attributes of Element:
* void cancelFullScreen()const unsigned short ALLOW_KEYBOARD_INPUT = 1
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.New methods of Element:
The current fullscreen element for the document is cleared.* void requestFullScreen(unsigned short flags)
New methods of Element:The current fullscreen element for the document is set to this element.
* void 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()* void requestFullScreenWithKeys().
Just as if When the ALLOW_KEYBOARD_INPUT flag is not specified, requestFullScreen/requestFullScreenWithKeys were called on hints to the element's owner documentUA that while in fullscreen state, except that the current fullscreen element 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 document is set user to input inappropriate data, and the UA may choose to this elementrelax restrictions on entering fullscreen state with keys disabled.
New DOM attribute of Document:
Returns true while the document is in the fullscreen state.
* readonly attribute boolean fullScreenKeysEnabledfullScreenKeyboardInputAllowed
Returns true while the window's toplevel browsing context is fullscreen and not in a "keys disabled" state.
* allowfullscreen
This is a boolean attribute. When this attribute is not set, UAs should ignore fullscreen requests in the iframe or its descendantsdescendant frames.
New events:
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-doc While a Document is in the fullscreen state, the 'full-screen-doc' pseudoclass applies to the root element of that Document. * :full-screen-doc-with-targetdocument
While a Document is in the fullscreen state and the document's current fullscreen element is an element in the document, the 'full-screen-doc-with-targetdocument' pseudoclass applies to the root element of that Document.
Suggested UA stylesheet rule:
/* A fullscreen element that is not the root element should be stretched to cover the viewport. */ :full-screen :not(:root) {
position:fixed;
top:0;
background:black;
}
/* In fullscreen mode, if the root element itself is not fullscreen then we should hide the viewport scrollbar. */ :full-screen-rootdocument:not(:full-with-target screen) {
overflow:hidden;
}
1,295
edits

Navigation menu