WebKit2.WebView.prototype.run_javascript

function run_javascript(script: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for webkit_web_view_run_javascript()
}
  

Asynchronously run script in the context of the current page in web_view. If WebKitWebSettings:enable-javascript is FALSE, this method will do nothing.

When the operation is finished, callback will be called. You can then call WebKit2.WebView.prototype.run_javascript_finish to get the result of the operation.

script

the script to run

cancellable

a Gio.Cancellable or null to ignore

callback

a Gio.AsyncReadyCallback to call when the script finished