Edit in GitHubLog an issue

window.Document

See: Web APIs - Document

Document()

Creates an instance of Document.

onLine : boolean

Read only Indicates if the computer is online

nodeName : string

Read only

nodeType : number

Read only

uxpContainer : UXPContainer

Read only

activeElement : Node

Read only

documentElement : Document

Read only

head : HTMLHeadElement

Read only

body : HTMLBodyElement

Read only

clipboard : Clippoard

Read only

styleSheets : StyleSheetList

Read only

contentEditable

Read only

isConnected : boolean

Read only

parentNode : Node

Read only

parentElement : Element

Read only

firstChild : Node

Read only

lastChild : Node

Read only

previousSibling : Node

Read only

nextSibling : Node

Read only

firstElementChild : Node

Read only

lastElementChild : Node

Read only

previousElementSibling : Node

Read only

nextElementSibling : Node

Read only

textContent : string

childNodes : NodeList

Read only

children : HTMLCollection

Read only

ownerDocument

Read only

attributes

Read only

createElement(name)

Returns: Element

ParamType
name
string

createElementNS(ns, name)

Returns: Element

ParamType
ns
string
name
string

createEvent(eventType)

See: dom-document-createevent

ParamType
eventType
string

createAttribute(nodeName)

Returns: Attr
See: https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute

ParamType
nodeName
string

createTextNode([text=])

Returns: Text

ParamType
[text=]
string

createComment([comment])

Returns: Comment

ParamTypeDefault
[comment]
string
"\"\""

createDocumentFragment()

Returns: DocumentFragment

createTreeWalker(root, whatToShow, filter)

[ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]

This represents the nodes of a document subtree and a position within them

Returns: TreeWalker

ParamTypeDescription
root
Node
A Node representing the root node as specified when the TreeWalker was created
whatToShow
number
An unsigned long being a bitmask made of constants describing the types of Node that must be presented
filter
NodeFilter
NodeFilter used to select the relevant nodes

cloneNode(deep)

Returns: Document

ParamType
deep
boolean

adoptNode(externalNode, deep)

Returns: Node

ParamType
externalNode
Node
deep
boolean

importNode(externalNode, deep)

Returns: Node

ParamType
externalNode
Node
deep
boolean

querySelector(selector)

Returns: Node

ParamType
selector
string

querySelectorAll(selector)

Returns: NodeList

ParamType
selector
string

getElementsByClassName(name)

Returns: NodeList

ParamType
name
string

getElementsByTagName(name)

Returns: NodeList

ParamType
name
string

getElementById(id)

Returns: Element

ParamType
id
string

hasChildNodes()

Returns: boolean

appendChild(child)

Returns: Node

ParamType
child
Node

insertBefore(child, before)

Returns: Node

ParamType
child
Node
before
Node

replaceChild(newChild, oldChild)

Returns: Node

ParamType
newChild
Node
oldChild
Node

removeChild(child)

Returns: Node

ParamType
child
Node

remove()

before(...nodes)

ParamType
...nodes
Array<Node>

after(...nodes)

ParamType
...nodes
Array<Node>

replaceWith(...nodes)

ParamType
...nodes
Array<Node>

contains(node)

ParamType
node
Node

getRootNode(options)

Returns: Node - root node

ParamType
options
Object

addEventListener(eventName, callback, options)

See: EventTarget - addEventListener

ParamTypeDescription
eventName
*
callback
*
options
boolean | Object
Boolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).

removeEventListener(eventName, callback, options)

See: EventTarget - removeEventListener

ParamTypeDescription
eventName
*
callback
*
options
boolean | Object
Boolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).

dispatchEvent(event)

ParamType
event
*
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.