DocumentFragment

open external class DocumentFragment : 
    Node,
    NonElementParentNode,
    ParentNode
(source)

Platform and version requirements: JS

Exposes the JavaScript DocumentFragment to Kotlin

Constructors

<init>

DocumentFragment()

Exposes the JavaScript DocumentFragment to Kotlin

Properties

childElementCount

open val childElementCount: Int

children

open val children: HTMLCollection

firstElementChild

open val firstElementChild: Element?

lastElementChild

open val lastElementChild: Element?

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?

Functions

append

open fun append(vararg nodes: dynamic)

getElementById

open fun getElementById(elementId: String): Element?

prepend

open fun prepend(vararg nodes: dynamic)

querySelector

open fun querySelector(selectors: String): Element?

querySelectorAll

open fun querySelectorAll(selectors: String): NodeList

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.

Inheritors

ShadowRoot

open external class ShadowRoot : 
    DocumentFragment,
    DocumentOrShadowRoot

Exposes the JavaScript ShadowRoot to Kotlin