UrlOpener

fun interface UrlOpener

Opens a URL the evaluator has already validated.

The evaluator performs the checks the specification makes mandatory — the http/https scheme allowlist, and the user-activation requirement — and then delegates, because opening a URL is a platform capability that commonMain does not have. Tab-nabbing protection (noopener,noreferrer) belongs to the browser implementation of this interface.

There is no default. openUrl fails with A2uiFunctionException until a renderer installs one, which is a visible failure rather than a call that silently does nothing.

Functions

Link copied to clipboard
abstract fun open(url: String)

Opens url, which is guaranteed to be absolute and http- or https-schemed.