Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CoordinateResult(val x: Double, val y: Double)

Result from atomic coordinate retrieval operation. Used by mouseMove() to get element center coordinates atomically.

Link copied to clipboard
open class DefaultElement(val tab: Tab, var node: DOM.Node, var tree: DOM.Node? = null) : Element

Default implementation of the Element interface.

Link copied to clipboard
interface Element

Represents a DOM element in the browser.

Link copied to clipboard
sealed class NodeOrElement
Link copied to clipboard
class Position(points: List<Double>)
Link copied to clipboard
@Serializable
data class PositionData(val left: Double, val top: Double, val right: Double, val bottom: Double, val scrollX: Double, val scrollY: Double)

Result from atomic position data retrieval operation. Used by getPosition() to get element bounds and scroll offsets atomically.

Properties

Link copied to clipboard

Converts MouseButton enum to the buttons bitmask value. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0

Functions

Link copied to clipboard
inline suspend fun <T> Element.apply(jsFunction: String, awaitPromise: Boolean = false): T?

Applies a JavaScript function to the element and returns the result. The given js_function string should accept the js element as parameter, and can be a arrow function, or function declaration.

Link copied to clipboard

Recursively searches the DOM tree starting from this node, returning the first node that matches the given predicate.

Link copied to clipboard

Recursively searches the DOM tree starting from this node, returning all nodes that match the given predicate.