addInitScript

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

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

Throws

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