Attr

abstract external class Attr : Node (source)

Platform and version requirements: JS

Exposes the JavaScript Attr to Kotlin

Constructors

<init>

Attr()

Exposes the JavaScript Attr to Kotlin

Properties

localName

open val localName: String

name

open val name: String

namespaceURI

open val namespaceURI: String?

ownerElement

open val ownerElement: Element?

prefix

open val prefix: String?

specified

open val specified: Boolean

value

open var value: String

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?

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?

previousSibling

open val previousSibling: Node?

textContent

open var textContent: String?

Inherited Functions

appendChild

fun appendChild(node: Node): Node

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()

removeChild

fun removeChild(child: Node): Node

replaceChild

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

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.