window.Text
See: https://developer.mozilla.org/en-US/docs/Web/API/Text
Text(document, textContent)
Creates an instance of Text.
Param
Type
document
*textContent
*nodeName : string
Read only Default: "\"#text\""
nodeType : number
Read only Default: Node.TEXT_NODE
nodeValue : string
data : string
textContent : string
length : number
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
childNodes : NodeList
Read only
children : HTMLCollection
Read only
ownerDocument
Read only
attributes
Read only
substringData(offset, count)
Returns: string
Param
Type
offset
*count
*appendData(arg)
Param
Type
arg
stringinsertData(offset, arg)
Param
Type
offset
numberarg
stringdeleteData(offset, count)
Param
Type
offset
numbercount
numberreplaceData(offset, count, arg)
Param
Type
offset
numbercount
numberarg
stringhasChildNodes()
Returns: boolean
cloneNode(deep)
Returns: Node
Param
Type
deep
booleanappendChild(child)
Returns: Node
Param
Type
child
NodeinsertBefore(child, before)
Returns: Node
Param
Type
child
Nodebefore
NodereplaceChild(newChild, oldChild)
Returns: Node
Param
Type
newChild
NodeoldChild
NoderemoveChild(child)
Returns: Node
Param
Type
child
Noderemove()
before(...nodes)
Param
Type
...nodes
Array<Node>after(...nodes)
Param
Type
...nodes
Array<Node>replaceWith(...nodes)
Param
Type
...nodes
Array<Node>contains(node)
Param
Type
node
NodegetRootNode(options)
Returns: Node - root node
Param
Type
options
ObjectaddEventListener(eventName, callback, options)
See: EventTarget - addEventListener
Param
Type
Description
eventName
*callback
*options
boolean | ObjectBoolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).
removeEventListener(eventName, callback, options)
See: EventTarget - removeEventListener
Param
Type
Description
eventName
*callback
*options
boolean | ObjectBoolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).
dispatchEvent(event)
Param
Type
event
*