DomNodeList

This adapter class just lifts the DOM API NodeList type into Kotlin's collection API.

In order to improve the further processing of typical DOM native calls, it makes sense to offer an adapter type.

To ease the usage further, there is a factory extension defined on NodeList named asElementList.

Example usage:

domnode // some DOM node
.querySelectorAll("") // DOM API's NodeList as result -> cumbersome iterating and processing!
.asElementList() // create this type via extension factory
.filter { it.hasAttribute("data-myData") } // process the result in some way...
.map { ... }

Parameters

base

the initial NodeList

Constructors

Link copied to clipboard
constructor(base: NodeList)

Properties

Link copied to clipboard
open override val size: Int
Link copied to clipboard

Returns true when the list contains no ValidationMessage which is marked with ValidationMessage.isError.

Functions

Link copied to clipboard
open operator override fun contains(element: Node): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Node>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Node
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun indexOf(element: Node): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Node>
Link copied to clipboard
open override fun lastIndexOf(element: Node): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<Node>
open override fun listIterator(index: Int): ListIterator<Node>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<Node>
Link copied to clipboard
open override fun toString(): String