All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.nacular.doodle.dom.Node.kt Maven / Gradle / Ivy

There is a newer version: 0.10.2
Show newest version
@file:Suppress("EXPECTED_EXTERNAL_DECLARATION", "WRONG_MODIFIER_TARGET")

package io.nacular.doodle.dom

internal expect abstract external class NodeList() {
    abstract val length: Int

    open fun item(index: Int): Node?
}

internal expect inline operator fun NodeList.get(index: Int): Node?

internal expect abstract external class Node: JsAny {
    fun cloneNode    (deep : Boolean           ): Node
    fun appendChild  (node : Node              ): Node
    fun removeChild  (child: Node              ): Node
    fun insertBefore (node : Node, child: Node?): Node
    fun replaceChild (node : Node, child: Node ): Node
    fun contains     (other: Node?             ): Boolean
    fun hasChildNodes(                         ): Boolean

    val nodeName     : String
    val firstChild   : Node?
    val parentNode   : Node?
    val childNodes   : NodeList
    val nextSibling  : Node?
    var textContent  : String?
    val parentElement: Element?
}

internal expect fun Node.clear()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy