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 the result of the code is 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.
Code execution will be suspended until web page stop loading.