1.26.2.1
Gameface
Document Interface Reference

The document of the view. More...

+ Inheritance diagram for Document:

Public Member Functions

Comment createComment (DOMString data)
 Creates a new comment node. More...
 
NodeIterator createNodeIterator (Node root, optional unsigned long whatToShow=0xFFFFFFFF, optional NodeFilter? filter=null)
 
Attr createAttribute (DOMString localName)
 
Attr createAttributeNS (DOMString? namespace, DOMString qualifiedName)
 Create new attribute node with an associated namespace. More...
 
Node importNode (Node node, optional boolean deep=false)
 Creates a new copy of the specified Node or DocumentFragment from another document so that it can be inserted into the current Document. More...
 
Node createElement (CSSString tagName)
 Create a new node. More...
 
DocumentFragment createDocumentFragment ()
 Create new DocumentFragment. More...
 
Node createElementNS (CSSString ns, CSSString tagName)
 
CustomElementConstructor registerElement (DOMString type, optional ElementRegistrationOptions options)
 Registers a custom element with the Custom Elements V0 API (deprecated) More...
 
Node createTextNode ([Default=Undefined] optional DOMString data)
 Creates a new Text node. More...
 
Event createEvent (CSSString eventType)
 Create a new event. More...
 
NodeList getElementsByName ([Default=Undefined] optional DOMString elementName)
 Get all nodes with a certain name. More...
 
NodeList getElementsByTagName (DOMString localName)
 Get all nodes with a certain tag. More...
 
Element getElementById (DOMString elementId)
 Get a element by its Id. More...
 
void write (DOMString markup)
 Writes a string of text to a document stream opened by document.open() More...
 
boolean hasFocus ()
 Indicating whether the document or any element inside the document has focus. More...
 
NodeList getElementsByClassName (DOMString classNames)
 Get all nodes with a certain class. More...
 
Element elementFromPoint (float x, float y)
 Returns topmost element at the position. More...
 
sequence< ElementelementsFromPoint (float x, float y)
 Returns array of elements at the position. More...
 
Element querySelector (DOMString selectors)
 
NodeList querySelectorAll (DOMString selectors)
 
Selection getSelection ()
 Returns a Selection object representing the range of text selected by the user, or the current position of the caret. More...
 
CaretPosition caretPositionFromPoint (float x, float y)
 Returns a CaretPosition object containing the DOM node containing the caret, and caret's character offset within that node. More...
 
- Public Member Functions inherited from Node
Node removeChild (Node oldChild)
 remove a child node More...
 
Node appendChild (Node newChild)
 append a node as a child More...
 
Node replaceChild (Node newChild, Node oldChild)
 replace oldChild with newChild More...
 
Node insertBefore (Node node, Node? referenceNode)
 insert a node before the reference node, as a child of the current node More...
 
Node cloneNode (optional boolean deep=false)
 
boolean isEqualNode (Node? otherNode)
 
boolean isSameNode (Node? otherNode)
 
boolean hasChildNodes ()
 
boolean contains (Node? other)
 
DOMString lookupPrefix (DOMString? namespace)
 
boolean isDefaultNamespace (DOMString? namespace)
 
void normalize ()
 
unsigned short compareDocumentPosition (Node other)
 
Node getRootNode (optional GetRootNodeOptions options)
 
DOMString lookupNamespaceURI (DOMString? prefix)
 
- Public Member Functions inherited from EventTarget
void addEventListener (DOMInternedString type, EventListener listener, [Default=Undefined] optional boolean useCapture)
 
void removeEventListener (DOMInternedString type, EventListener listener, [Default=Undefined] optional boolean useCapture)
 
boolean dispatchEvent (Event event)
 

Public Attributes

readonly attribute USVString URL
 Returns the document location as a string. More...
 
readonly attribute USVString documentURI
 Returns the document location as a string. More...
 
readonly attribute USVString origin
 Returns the document's origin. More...
 
readonly attribute DOMString compatMode
 Indicates whether the document is rendered in Quirks mode or Standards mode. More...
 
readonly attribute DOMString characterSet
 Returns the character encoding of the current document. The character encoding is the character set used for rendering the document, which may be different from the encoding specified by the page. More...
 
readonly attribute DOMString charset
 historical alias of .characterSet More...
 
readonly attribute DOMString inputEncoding
 historical alias of .characterSet More...
 
readonly attribute DOMString contentType
 Returns the MIME type that the document is being rendered as. More...
 
readonly attribute DocumentType doctype
 Returns the Document Type Declaration (DTD) associated with current document. More...
 
readonly attribute Element body
 The document body. More...
 
readonly attribute Element documentElement
 The root element of the document. More...
 
readonly attribute Window defaultView
 The window object associated with the document. More...
 
readonly attribute Element head
 The document head element. More...
 
readonly attribute DOMString readyState
 Describes the loading state of the document (loading/interactive/complete) More...
 
readonly attribute Element activeElement
 The deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. More...
 
readonly attribute HTMLScriptElement currentScript
 
readonly attribute StyleSheetList styleSheets
 
attribute EventSetter abort
 
attribute EventSetter blur
 
attribute EventSetter click
 
attribute EventSetter dblclick
 
attribute EventSetter error
 
attribute EventSetter focus
 
attribute EventSetter keydown
 
attribute EventSetter keypress
 
attribute EventSetter keyup
 
attribute EventSetter load
 
attribute EventSetter mousedown
 
attribute EventSetter mouseover
 
attribute EventSetter mouseout
 
attribute EventSetter mouseenter
 
attribute EventSetter mouseleave
 
attribute EventSetter mousemove
 
attribute EventSetter mouseup
 
attribute EventSetter input
 
attribute EventSetter scroll
 
attribute EventSetter wheel
 
attribute EventSetter touchstart
 
attribute EventSetter touchend
 
attribute EventSetter touchmove
 
- Public Attributes inherited from Node
readonly attribute DOMString nodeName
 
attribute DOMString nodeValue
 
attribute DOMString textContent
 
readonly attribute unsigned short nodeType
 type of the node More...
 
readonly attribute Node parentNode
 parent of the node More...
 
readonly attribute Element parentElement
 parent element of the node. If parent is not an Element, returns null. More...
 
readonly attribute NodeList childNodes
 list of the children of this node More...
 
readonly attribute Node firstChild
 the node's first child in the tree, or null if the node is childless More...
 
readonly attribute Node lastChild
 last child of the node, or null if there are no child elements More...
 
readonly attribute Node previousSibling
 the node immediately preceding the specified one in its parent's children, or null if the specified node is the first in that list More...
 
readonly attribute Node nextSibling
 the node immediately following the specified one in its parent's children, or null if the specified node is the last node in that list More...
 
readonly attribute Document ownerDocument
 The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null. More...
 
readonly attribute USVString baseURI
 
readonly attribute boolean isConnected
 
const unsigned short ELEMENT_NODE = 1
 
const unsigned short ATTRIBUTE_NODE = 2
 
const unsigned short TEXT_NODE = 3
 
const unsigned short CDATA_SECTION_NODE = 4
 
const unsigned short ENTITY_REFERENCE_NODE = 5
 
const unsigned short ENTITY_NODE = 6
 
const unsigned short PROCESSING_INSTRUCTION_NODE = 7
 
const unsigned short COMMENT_NODE = 8
 
const unsigned short DOCUMENT_NODE = 9
 
const unsigned short DOCUMENT_TYPE_NODE = 10
 
const unsigned short DOCUMENT_FRAGMENT_NODE = 11
 
const unsigned short NOTATION_NODE = 12
 
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01
 
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02
 
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04
 
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08
 
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10
 
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
 

Detailed Description

The document of the view.

Member Function Documentation

◆ caretPositionFromPoint()

CaretPosition Document::caretPositionFromPoint ( float  x,
float  y 
)

Returns a CaretPosition object containing the DOM node containing the caret, and caret's character offset within that node.

◆ createAttribute()

Attr Document::createAttribute ( DOMString  localName)
Parameters
localNameis a string containing the name of the attribute.
Returns
new attribute node

◆ createAttributeNS()

Attr Document::createAttributeNS ( DOMString?  namespace,
DOMString  qualifiedName 
)

Create new attribute node with an associated namespace.

Parameters
namespacethe URI of the namespace.
qualifiedNamethe tag name and prefix of the attribute
Returns
new attribute node

◆ createComment()

Comment Document::createComment ( DOMString  data)

Creates a new comment node.

Returns
the newly created node, not attached

◆ createDocumentFragment()

DocumentFragment Document::createDocumentFragment ( )

Create new DocumentFragment.

Returns
the newly created DocumentFragment

◆ createElement()

Node Document::createElement ( CSSString  tagName)

Create a new node.

Parameters
tagNamethe type of the new node
Returns
the newly created node, not attached

◆ createElementNS()

Node Document::createElementNS ( CSSString  ns,
CSSString  tagName 
)

◆ createEvent()

Event Document::createEvent ( CSSString  eventType)

Create a new event.

Parameters
eventTypespecified the type of Event interface to be created
Returns
the newly created Event

◆ createNodeIterator()

NodeIterator Document::createNodeIterator ( Node  root,
optional unsigned long  whatToShow = 0xFFFFFFFF,
optional NodeFilter filter = null 
)
Returns
a new NodeIterator object.

◆ createTextNode()

Node Document::createTextNode ( [Default=Undefined] optional DOMString  data)

Creates a new Text node.

Parameters
datathe text content of the node
Returns
the created node

◆ elementFromPoint()

Element Document::elementFromPoint ( float  x,
float  y 
)

Returns topmost element at the position.

◆ elementsFromPoint()

sequence<Element> Document::elementsFromPoint ( float  x,
float  y 
)

Returns array of elements at the position.

◆ getElementById()

Element Document::getElementById ( DOMString  elementId)

Get a element by its Id.

Parameters
elementIdthe element id to search for
Returns
the element or null

◆ getElementsByClassName()

NodeList Document::getElementsByClassName ( DOMString  classNames)

Get all nodes with a certain class.

Parameters
classNamesthe classes to search for
Returns
NodeList of all the elements with the classes

◆ getElementsByName()

NodeList Document::getElementsByName ( [Default=Undefined] optional DOMString  elementName)

Get all nodes with a certain name.

Parameters
elementNamethe name to search for
Returns
NodeList of all the elements with the name

◆ getElementsByTagName()

NodeList Document::getElementsByTagName ( DOMString  localName)

Get all nodes with a certain tag.

Parameters
localNamethe tag to search for
Returns
NodeList of all the elements with the tag

◆ getSelection()

Selection Document::getSelection ( )

Returns a Selection object representing the range of text selected by the user, or the current position of the caret.

◆ hasFocus()

boolean Document::hasFocus ( )

Indicating whether the document or any element inside the document has focus.

Returns
false if the active element in the document has no focus; true if the active element in the document has focus

◆ importNode()

Node Document::importNode ( Node  node,
optional boolean  deep = false 
)

Creates a new copy of the specified Node or DocumentFragment from another document so that it can be inserted into the current Document.

Returns
the newly created node, not attached

◆ querySelector()

Element Document::querySelector ( DOMString  selectors)

◆ querySelectorAll()

NodeList Document::querySelectorAll ( DOMString  selectors)

◆ registerElement()

CustomElementConstructor Document::registerElement ( DOMString  type,
optional ElementRegistrationOptions  options 
)

Registers a custom element with the Custom Elements V0 API (deprecated)

Parameters
typethe name of the newly registered type
optionsthe options for registering. Must include a "prototype" property with the element prototype, and an optional "extends" property for extending existing classes
Returns
the prototype object for the newly registered element

◆ write()

void Document::write ( DOMString  markup)

Writes a string of text to a document stream opened by document.open()

Parameters
markupA string containing the text to be written to the document.

Member Data Documentation

◆ abort

attribute EventSetter Document::abort

◆ activeElement

readonly attribute Element Document::activeElement

The deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document.

◆ blur

attribute EventSetter Document::blur

◆ body

readonly attribute Element Document::body

The document body.

◆ characterSet

readonly attribute DOMString Document::characterSet

Returns the character encoding of the current document. The character encoding is the character set used for rendering the document, which may be different from the encoding specified by the page.

◆ charset

readonly attribute DOMString Document::charset

historical alias of .characterSet

◆ click

attribute EventSetter Document::click

◆ compatMode

readonly attribute DOMString Document::compatMode

Indicates whether the document is rendered in Quirks mode or Standards mode.

◆ contentType

readonly attribute DOMString Document::contentType

Returns the MIME type that the document is being rendered as.

◆ currentScript

readonly attribute HTMLScriptElement Document::currentScript

◆ dblclick

attribute EventSetter Document::dblclick

◆ defaultView

readonly attribute Window Document::defaultView

The window object associated with the document.

◆ doctype

readonly attribute DocumentType Document::doctype

Returns the Document Type Declaration (DTD) associated with current document.

◆ documentElement

readonly attribute Element Document::documentElement

The root element of the document.

◆ documentURI

readonly attribute USVString Document::documentURI

Returns the document location as a string.

◆ error

attribute EventSetter Document::error

◆ focus

attribute EventSetter Document::focus

◆ head

readonly attribute Element Document::head

The document head element.

◆ input

attribute EventSetter Document::input

◆ inputEncoding

readonly attribute DOMString Document::inputEncoding

historical alias of .characterSet

◆ keydown

attribute EventSetter Document::keydown

◆ keypress

attribute EventSetter Document::keypress

◆ keyup

attribute EventSetter Document::keyup

◆ load

attribute EventSetter Document::load

◆ mousedown

attribute EventSetter Document::mousedown

◆ mouseenter

attribute EventSetter Document::mouseenter

◆ mouseleave

attribute EventSetter Document::mouseleave

◆ mousemove

attribute EventSetter Document::mousemove

◆ mouseout

attribute EventSetter Document::mouseout

◆ mouseover

attribute EventSetter Document::mouseover

◆ mouseup

attribute EventSetter Document::mouseup

◆ origin

readonly attribute USVString Document::origin

Returns the document's origin.

◆ readyState

readonly attribute DOMString Document::readyState

Describes the loading state of the document (loading/interactive/complete)

◆ scroll

attribute EventSetter Document::scroll

◆ styleSheets

readonly attribute StyleSheetList Document::styleSheets

◆ touchend

attribute EventSetter Document::touchend

◆ touchmove

attribute EventSetter Document::touchmove

◆ touchstart

attribute EventSetter Document::touchstart

◆ URL

readonly attribute USVString Document::URL

Returns the document location as a string.

◆ wheel

attribute EventSetter Document::wheel