Node

abstract external class Node : EventTarget

Exposes the JavaScript Node to Kotlin

Constructors

Node
Link copied to clipboard
fun Node()

Types

Companion
Link copied to clipboard
object Companion

Functions

addEventListener
Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
appendChild
Link copied to clipboard
fun appendChild(node: Node): Node
cloneNode
Link copied to clipboard
fun cloneNode(deep: Boolean = definedExternally): Node
compareDocumentPosition
Link copied to clipboard
fun compareDocumentPosition(other: Node): Short
contains
Link copied to clipboard
fun contains(other: Node?): Boolean
dispatchEvent
Link copied to clipboard
fun dispatchEvent(event: Event): Boolean
getRootNode
Link copied to clipboard
fun getRootNode(options: GetRootNodeOptions = definedExternally): Node
hasChildNodes
Link copied to clipboard
fun hasChildNodes(): Boolean
insertBefore
Link copied to clipboard
fun insertBefore(node: Node, child: Node?): Node
isDefaultNamespace
Link copied to clipboard
fun isDefaultNamespace(namespace: String?): Boolean
isEqualNode
Link copied to clipboard
fun isEqualNode(otherNode: Node?): Boolean
isSameNode
Link copied to clipboard
fun isSameNode(otherNode: Node?): Boolean
lookupNamespaceURI
Link copied to clipboard
fun lookupNamespaceURI(prefix: String?): String?
lookupPrefix
Link copied to clipboard
fun lookupPrefix(namespace: String?): String?
normalize
Link copied to clipboard
fun normalize()
removeChild
Link copied to clipboard
fun removeChild(child: Node): Node
removeEventListener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
replaceChild
Link copied to clipboard
fun replaceChild(node: Node, child: Node): Node

Properties

baseURI
Link copied to clipboard
open val baseURI: String
childNodes
Link copied to clipboard
open val childNodes: NodeList
firstChild
Link copied to clipboard
open val firstChild: Node?
isConnected
Link copied to clipboard
open val isConnected: Boolean
lastChild
Link copied to clipboard
open val lastChild: Node?
nextSibling
Link copied to clipboard
open val nextSibling: Node?
nodeName
Link copied to clipboard
open val nodeName: String
nodeType
Link copied to clipboard
open val nodeType: Short
nodeValue
Link copied to clipboard
open var nodeValue: String?
ownerDocument
Link copied to clipboard
open val ownerDocument: Document?
parentElement
Link copied to clipboard
open val parentElement: Element?
parentNode
Link copied to clipboard
open val parentNode: Node?
previousSibling
Link copied to clipboard
open val previousSibling: Node?
textContent
Link copied to clipboard
open var textContent: String?

Inheritors

Document
Link copied to clipboard
DocumentType
Link copied to clipboard
DocumentFragment
Link copied to clipboard
Element
Link copied to clipboard
Attr
Link copied to clipboard
CharacterData
Link copied to clipboard

Extensions

clear
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Node.clear()
fun Node.clear()

Removes all the children from this node.

isElement
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
val Node.isElement: Boolean
val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
val Node.isText: Boolean
val Node.isText: Boolean

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