### Method

# WebKit2 WebView run_javascript_in_world

deprecated: 2.40 since: 2.22

#### Declaration [src]

    void
    webkit_web_view_run_javascript_in_world (
      WebKitWebView* web_view,
      const gchar* script,
      const gchar* world_name,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously run `script` in the script world.

Asynchronously run `script` in the script world with name `world_name` of the current page context in `web_view`. If WebKitSettings:enable-javascript is FALSE, this method will do nothing.

When the operation is finished, `callback` will be called. You can then call `webkit_web_view_run_javascript_in_world_finish()` to get the result of the operation.

Available since: 2.22

Deprecated since: 2.40

Use `webkit_web_view_evaluate_javascript()` instead.

#### Parameters

`script`

  Type: `const gchar*`

  The script to run.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`world_name`

  Type: `const gchar*`

  The name of a `WebKitScriptWorld`.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` or `NULL` to ignore.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the script finished.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  The data to pass to callback function.

  The argument can be `NULL`.
  The data is owned by the caller of the function.