Text

Extends: CharacterData

See: https://developer.mozilla.org/en-US/docs/Web/API/Text

new Text(document, textContent)

Creates an instance of Text.

Param Type
document *
textContent *

text.nodeName : string

Default: "\"#text\""

Read only

text.nodeType : number

Default: Node.TEXT_NODE

Read only

text.data : string

text.textContent : string

text.nodeValue : string

text.length : number

Read only

text.contentEditable

Read only

text.isConnected : boolean

Read only

text.parentNode : Node

Read only

text.parentElement : Element

Read only

text.firstChild : Node

Read only

text.lastChild : Node

Read only

text.previousSibling : Node

Read only

text.nextSibling : Node

Read only

text.firstElementChild : Node

Read only

text.lastElementChild : Node

Read only

text.previousElementSibling : Node

Read only

text.nextElementSibling : Node

Read only

text.childNodes : NodeList

Read only

text.children : HTMLCollection

Read only

text.ownerDocument

Read only

text.attributes

Read only

text.substringData(offset, count)

Param Type
offset *
count *

text.appendData(arg)

Param Type
arg string

text.insertData(offset, arg)

Param Type
offset number
arg string

text.deleteData(offset, count)

Param Type
offset number
count number

text.replaceData(offset, count, arg)

Param Type
offset number
count number
arg string

text.hasChildNodes()

text.cloneNode(deep)

Param Type
deep boolean

text.appendChild(child)

Param Type
child Node

text.insertBefore(child, before)

Param Type
child Node
before Node

text.replaceChild(newChild, oldChild)

Param Type
newChild Node
oldChild Node

text.removeChild(child)

Param Type
child Node

text.remove()

text.before(...nodes)

Param Type
...nodes Array.<Node>

text.after(...nodes)

Param Type
...nodes Array.<Node>

text.replaceWith(...nodes)

Param Type
...nodes Array.<Node>

text.contains(node)

Param Type
node Node

text.addEventListener(eventName, callback, [capture])

Param Type Default
eventName *
callback *
[capture] boolean false

text.removeEventListener(eventName, callback, [capture])

Param Type Default
eventName *
callback *
[capture] boolean false

text.dispatchEvent(event)

Param Type
event *

results matching ""

    No results matching ""