querySelector

abstract suspend fun querySelector(selector: String, node: NodeOrElement? = null): Element?

Finds a single element based on a CSS selector string.

Return

The found Element, or null if no matching element is found.

Parameters

selector

CSS selector(s).

node

For internal use. The node to start the search from. Defaults to the document root.