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

main.dom.ParentNode.kt Maven / Gradle / Ivy

// Automatically generated - do not modify!

package dom

import dom.html.HTMLCollection
import dom.html.HTMLElement
import dom.html.HtmlTagName
import dom.svg.SVGElement
import dom.svg.SvgTagName

sealed external interface ParentNode /* : Node */ {
    val childElementCount: Int

    /** Returns the child elements. */
    val children: HTMLCollection<*>

    /** Returns the first child that is an element, and null otherwise. */
    val firstElementChild: Element?

    /** Returns the last child that is an element, and null otherwise. */
    val lastElementChild: Element?

    /**
     * Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
     *
     * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
     */
    fun append(vararg nodes: Any /* Node | string */)

    /**
     * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
     *
     * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
     */
    fun prepend(vararg nodes: Any /* Node | string */)

    /** Returns the first element that is a descendant of node that matches selectors. */
    fun  querySelector(selectors: HtmlTagName): T?
    fun  querySelector(selectors: SvgTagName): T?
    fun querySelector(selectors: String): Element?

    /** Returns all element descendants of node that match selectors. */
    fun  querySelectorAll(selectors: HtmlTagName): NodeListOf
    fun  querySelectorAll(selectors: SvgTagName): NodeListOf
    fun querySelectorAll(selectors: String): NodeListOf

    /**
     * Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
     *
     * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
     */
    fun replaceChildren(vararg nodes: Any /* Node | string */)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy