Document : Node
Instance Properties
Returns the currently focused element. If there is no focused element, returns this.body. See also hasFocus(), window.onblur, and window.onfocus.
Example:
RunResults:
Returns the cookies sent to the server when requesting resources. You can add additional cookies by setting 'key=value' strings to cookie. This will replace any existing value for the specified cookie but will not affect other cookies. You may append additional metadata for the cookie by adding ';metadata-key1=metadata-value1;metadata-key2=metadata-value2;...' to the end of the string when setting the cookie. See Set Cookie Syntax (on page 5) for more details on the supported metadata keys and values.
Example:
RunResults:
The element that is currently fullscreen from a call to element.requestFullscreen().
The element that currently has the pointer locked by a call to element.requestPointerLock().
Instance Methods
Releases the pointer locked with element.requestPointerLock().
Example:
RunResults:
Returns a NodeList containing the Elements in the document where the Element.className matches the specified classNames. classNames can contain multiple classes, separated by spaces, and the returned Elements must contain all the classes. The returned NodeList will update as the document changes.
Example:
RunResults:
Returns a NodeList containing the Elements in the document that have the Element.tagName equal to tagName (case insensitive). The returned NodeList will update as the document changes.
Example:
RunResults:
Returns true if the document has keyboard focus. See also activeElement, window.onblur, and window.onfocus.
Example:
RunResults:
Returns a NodeList containing the Elements in the document that match the CSS selector. Note that unlike getElementsByClassName() or getElementsByTagName(), the returned NodeList does not update as the document changes.