WebKit2.WebView.prototype.run_javascript_from_gresource

function run_javascript_from_gresource(resource: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for webkit_web_view_run_javascript_from_gresource()
}
  

Asynchronously run the script from resource in the context of the current page in web_view.

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

resource

the location of the resource to load

cancellable

a Gio.Cancellable or null to ignore

callback

a Gio.AsyncReadyCallback to call when the script finished