Document
Extends: Node
See: https://developer.mozilla.org/en-US/docs/Web/API/Document
- 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 | string |
document.createElementNS(ns, nodeName)
Param | Type |
---|---|
ns | string |
nodeName | string |
document.createAttribute(nodeName)
Param | Type |
---|---|
nodeName | string |
document.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 | boolean |
document.adoptNode(externalNode, deep)
Param | Type |
---|---|
externalNode | Node |
deep | boolean |
document.importNode(externalNode, deep)
Param | Type |
---|---|
externalNode | Node |
deep | boolean |
document.querySelector(selector)
Param | Type |
---|---|
selector | string |
document.querySelectorAll(selector)
Param | Type |
---|---|
selector | string |
document.getElementsByClassName(name)
Param | Type |
---|---|
name | string |
document.getElementsByTagName(name)
Param | Type |
---|---|
name | string |
document.getElementById(id)
Param | Type |
---|---|
id | string |
document.hasChildNodes()
document.appendChild(child)
Param | Type |
---|---|
child | Node |
document.insertBefore(child, before)
Param | Type |
---|---|
child | Node |
before | Node |
document.replaceChild(newChild, oldChild)
Param | Type |
---|---|
newChild | Node |
oldChild | Node |
document.removeChild(child)
Param | Type |
---|---|
child | Node |
document.remove()
document.before(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
document.after(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
document.replaceWith(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
document.contains(node)
Param | Type |
---|---|
node | Node |
document.addEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
document.removeEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
document.dispatchEvent(event)
Param | Type |
---|---|
event | * |