Document
Extends: Node
See: https://developer.mozilla.org/en-US/docs/Web/API/Document
-
- new Document()
- .onLine :
boolean - .nodeName :
string - .nodeType :
number - .uxpContainer
- .activeElement :
Node - .documentElement :
Document - .head :
HTMLHeadElement - .body :
HTMLBodyElement - .clipboard :
Clippoard - .styleSheets :
StyleSheetList - .contentEditable
- .isConnected :
boolean - .parentNode :
Node - .parentElement :
Element - .firstChild :
Node - .lastChild :
Node - .previousSibling :
Node - .nextSibling :
Node - .firstElementChild :
Node - .lastElementChild :
Node - .previousElementSibling :
Node - .nextElementSibling :
Node - .textContent :
string - .childNodes :
NodeList - .children :
HTMLCollection - .ownerDocument
- .attributes
- .createElement(nodeName)
- .createElementNS(ns, nodeName)
- .createAttribute(nodeName)
- .createTextNode([text])
- .createComment([comment])
- .createDocumentFragment()
- .cloneNode(deep)
- .adoptNode(externalNode, deep)
- .importNode(externalNode, deep)
- .querySelector(selector)
- .querySelectorAll(selector)
- .getElementsByClassName(name)
- .getElementsByTagName(name)
- .getElementById(id)
- .hasChildNodes()
- .appendChild(child)
- .insertBefore(child, before)
- .replaceChild(newChild, oldChild)
- .removeChild(child)
- .remove()
- .before(...nodes)
- .after(...nodes)
- .replaceWith(...nodes)
- .contains(node)
- .addEventListener(eventName, callback, [capture])
- .removeEventListener(eventName, callback, [capture])
- .dispatchEvent(event)
new Document()
Creates an instance of Document.
document.onLine : boolean
Indicates if the computer is online
Read only
document.nodeName : string
Read only
document.nodeType : number
Read only
document.uxpContainer
document.activeElement : Node
Read only
document.documentElement : Document
Read only
document.head : HTMLHeadElement
Read only
document.body : HTMLBodyElement
Read only
document.clipboard : Clippoard
Read only
document.styleSheets : StyleSheetList
Read only
document.contentEditable
Read only
document.isConnected : boolean
Read only
document.parentNode : Node
Read only
document.parentElement : Element
Read only
document.firstChild : Node
Read only
document.lastChild : Node
Read only
document.previousSibling : Node
Read only
document.nextSibling : Node
Read only
document.firstElementChild : Node
Read only
document.lastElementChild : Node
Read only
document.previousElementSibling : Node
Read only
document.nextElementSibling : Node
Read only
document.textContent : string
document.childNodes : NodeList
Read only
document.children : HTMLCollection
Read only
document.ownerDocument
Read only
document.attributes
Read only
document.createElement(nodeName)
Param
Type
nodeName
stringdocument.createElementNS(ns, nodeName)
Param
Type
ns
stringnodeName
stringdocument.createAttribute(nodeName)
Param
Type
nodeName
stringdocument.createTextNode([text])
Param
Type
Default
[text]
string""document.createComment([comment])
Param
Type
Default
[comment]
string""document.createDocumentFragment()
document.cloneNode(deep)
Overrides: cloneNode
Param
Type
deep
booleandocument.adoptNode(externalNode, deep)
document.importNode(externalNode, deep)
document.querySelector(selector)
Param
Type
selector
stringdocument.querySelectorAll(selector)
Param
Type
selector
stringdocument.getElementsByClassName(name)
Param
Type
name
stringdocument.getElementsByTagName(name)
Param
Type
name
stringdocument.getElementById(id)
Param
Type
id
stringdocument.hasChildNodes()
document.appendChild(child)
Param
Type
child
document.insertBefore(child, before)
document.replaceChild(newChild, oldChild)
document.removeChild(child)
Param
Type
child
document.remove()
document.before(...nodes)
Param
Type
...nodes
document.after(...nodes)
Param
Type
...nodes
document.replaceWith(...nodes)
Param
Type
...nodes
document.contains(node)
Param
Type
node
document.addEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalsedocument.removeEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalsedocument.dispatchEvent(event)
Param
Type
event
\*