WebKit2.UserScript.new_for_world
Description: Reference for WebKit2.UserScript.new_for_world

### Function

# WebKit2 UserScriptnew_for_world

#### Declaration [src]

    WebKitUserScript*
    webkit_user_script_new_for_world (
      const gchar* source,
      WebKitUserContentInjectedFrames injected_frames,
      WebKitUserScriptInjectionTime injection_time,
      const gchar* world_name,
      const gchar* const* allow_list,
      const gchar* const* block_list
    )

#### Description [src]

Creates a new user script for script world with name `world_name`.

See `webkit_user_script_new()` for a full description.

Available since: | 2.22

#### Parameters

`source` | `const gchar*`
| Source code of the user script.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`injected_frames` | `WebKitUserContentInjectedFrames`
| A `WebKitUserContentInjectedFrames` value.
`injection_time` | `WebKitUserScriptInjectionTime`
| A `WebKitUserScriptInjectionTime` value.
`world_name` | `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.
`allow_list` | An array of `gchar*`
| An allow_list of URI patterns or `NULL`.
| The argument can be `NULL`.
| The array must be `NULL`-terminated.
| The data is owned by the caller of the function.
| Each element is a NUL terminated UTF-8 string.
`block_list` | An array of `gchar*`
| A block_list of URI patterns or `NULL`.
| The argument can be `NULL`.
| The array must be `NULL`-terminated.
| The data is owned by the caller of the function.
| Each element is a NUL terminated UTF-8 string.

#### Return value

Returns: | `WebKitUserScript`
| A new `WebKitUserScript`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.