CharacterData

abstract external class CharacterData : 
    Node,
    NonDocumentTypeChildNode,
    ChildNode
(source)

Platform and version requirements: JS

Exposes the JavaScript CharacterData to Kotlin

Constructors

<init>

CharacterData()

Exposes the JavaScript CharacterData to Kotlin

Properties

data

open var data: String

length

open val length: Int

Inherited Properties

baseURI

open val baseURI: String

childNodes

open val childNodes: NodeList

firstChild

open val firstChild: Node?

isConnected

open val isConnected: Boolean

lastChild

open val lastChild: Node?

nextElementSibling

abstract val nextElementSibling: Element?

nextSibling

open val nextSibling: Node?

nodeName

open val nodeName: String

nodeType

open val nodeType: Short

nodeValue

open var nodeValue: String?

ownerDocument

open val ownerDocument: Document?

parentElement

open val parentElement: Element?

parentNode

open val parentNode: Node?

previousElementSibling

abstract val previousElementSibling: Element?

previousSibling

open val previousSibling: Node?

textContent

open var textContent: String?

Functions

appendData

fun appendData(data: String)

deleteData

fun deleteData(offset: Int, count: Int)

insertData

fun insertData(offset: Int, data: String)

replaceData

fun replaceData(offset: Int, count: Int, data: String)

substringData

fun substringData(offset: Int, count: Int): String

Inherited Functions

after

abstract fun after(vararg nodes: dynamic)

appendChild

fun appendChild(node: Node): Node

before

abstract fun before(vararg nodes: dynamic)

cloneNode

fun cloneNode(deep: Boolean = definedExternally): Node

compareDocumentPosition

fun compareDocumentPosition(other: Node): Short

contains

fun contains(other: Node?): Boolean

getRootNode

fun getRootNode(
    options: GetRootNodeOptions = definedExternally
): Node

hasChildNodes

fun hasChildNodes(): Boolean

insertBefore

fun insertBefore(node: Node, child: Node?): Node

isDefaultNamespace

fun isDefaultNamespace(namespace: String?): Boolean

isEqualNode

fun isEqualNode(otherNode: Node?): Boolean

isSameNode

fun isSameNode(otherNode: Node?): Boolean

lookupNamespaceURI

fun lookupNamespaceURI(prefix: String?): String?

lookupPrefix

fun lookupPrefix(namespace: String?): String?

normalize

fun normalize()

remove

abstract fun remove()

removeChild

fun removeChild(child: Node): Node

replaceChild

fun replaceChild(node: Node, child: Node): Node

replaceWith

abstract fun replaceWith(vararg nodes: dynamic)

Extension Properties

isElement

val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText

val Node.isText: Boolean

Gets a value indicating whether this node is a TEXT_NODE or a CDATA_SECTION_NODE.

Extension Functions

clear

fun Node.clear()

Removes all the children from this node.

Inheritors

Comment

open external class Comment : CharacterData

Exposes the JavaScript Comment to Kotlin

ProcessingInstruction

abstract external class ProcessingInstruction : 
    CharacterData,
    LinkStyle,
    UnionElementOrProcessingInstruction

Exposes the JavaScript ProcessingInstruction to Kotlin

Text

open external class Text : 
    CharacterData,
    Slotable,
    GeometryUtils

Exposes the JavaScript Text to Kotlin