addInitScript

open suspend override fun addInitScript(script: String, allowedOrigins: Set<String>)

Installs a script that runs before any page script, on this and every subsequent document.

Throws

BrowserException

ErrorCode.UNSUPPORTED where the device's WebView cannot install one. There is no silent fallback.