CharacterData
Extends: Node
See: https://developer.mozilla.org/en-US/docs/Web/API/CharacterData
- CharacterData
- new CharacterData(document, textContent)
- .data :
string
- .textContent :
string
- .nodeValue :
string
- .length :
number
- .contentEditable
- .isConnected :
boolean
- .parentNode :
Node
- .parentElement :
Element
- .firstChild :
Node
- .lastChild :
Node
- .previousSibling :
Node
- .nextSibling :
Node
- .firstElementChild :
Node
- .lastElementChild :
Node
- .previousElementSibling :
Node
- .nextElementSibling :
Node
- .childNodes :
NodeList
- .children :
HTMLCollection
- .ownerDocument
- .attributes
- .substringData(offset, count)
- .appendData(arg)
- .insertData(offset, arg)
- .deleteData(offset, count)
- .replaceData(offset, count, arg)
- .hasChildNodes()
- .cloneNode(deep)
- .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 CharacterData(document, textContent)
Creates an instance of CharacterData.
Param | Type |
---|---|
document | * |
textContent | * |
characterData.data : string
characterData.textContent : string
Overrides: textContent
characterData.nodeValue : string
characterData.length : number
Read only
characterData.contentEditable
Read only
characterData.isConnected : boolean
Read only
characterData.parentNode : Node
Read only
characterData.parentElement : Element
Read only
characterData.firstChild : Node
Read only
characterData.lastChild : Node
Read only
characterData.previousSibling : Node
Read only
characterData.nextSibling : Node
Read only
characterData.firstElementChild : Node
Read only
characterData.lastElementChild : Node
Read only
characterData.previousElementSibling : Node
Read only
characterData.nextElementSibling : Node
Read only
characterData.childNodes : NodeList
Read only
characterData.children : HTMLCollection
Read only
characterData.ownerDocument
Read only
characterData.attributes
Read only
characterData.substringData(offset, count)
Param | Type |
---|---|
offset | * |
count | * |
characterData.appendData(arg)
Param | Type |
---|---|
arg | string |
characterData.insertData(offset, arg)
Param | Type |
---|---|
offset | number |
arg | string |
characterData.deleteData(offset, count)
Param | Type |
---|---|
offset | number |
count | number |
characterData.replaceData(offset, count, arg)
Param | Type |
---|---|
offset | number |
count | number |
arg | string |
characterData.hasChildNodes()
characterData.cloneNode(deep)
Param | Type |
---|---|
deep | boolean |
characterData.appendChild(child)
Param | Type |
---|---|
child | Node |
characterData.insertBefore(child, before)
Param | Type |
---|---|
child | Node |
before | Node |
characterData.replaceChild(newChild, oldChild)
Param | Type |
---|---|
newChild | Node |
oldChild | Node |
characterData.removeChild(child)
Param | Type |
---|---|
child | Node |
characterData.remove()
characterData.before(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
characterData.after(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
characterData.replaceWith(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
characterData.contains(node)
Param | Type |
---|---|
node | Node |
characterData.addEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
characterData.removeEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
characterData.dispatchEvent(event)
Param | Type |
---|---|
event | * |