executeJavaScript
fun executeJavaScript(code: String, userGesture: Boolean = definedExternally): Promise<Any?>(source)
A promise that resolves with the result of the executed code or is rejected if execution throws or results in a rejected promise.
Evaluates code
in page.
In the browser window some HTML APIs like requestFullScreen
can only be invoked by a gesture from the user. Setting userGesture
to true
will remove this limitation.