WebKit2.UserStyleSheet.new_for_world
Description: Reference for WebKit2.UserStyleSheet.new_for_world

### Function

# WebKit2 UserStyleSheetnew_for_world

since: 2.22

#### Declaration [src]

    WebKitUserStyleSheet*
    webkit_user_style_sheet_new_for_world (
      const gchar* source,
      WebKitUserContentInjectedFrames injected_frames,
      WebKitUserStyleLevel level,
      const gchar* world_name,
      const gchar* const* allow_list,
      const gchar* const* block_list
    )

#### Description [src]

Creates a new user style sheet for script world.

Creates a new user style sheet for script world with name `world_name`. See `webkit_user_style_sheet_new()` for a full description.

Available since: 2.22

#### Parameters

`source`

  Type: `const gchar*`

  Source code of the user style sheet.

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

`injected_frames`

  Type: `WebKitUserContentInjectedFrames`

  A `WebKitUserContentInjectedFrames` value.

`level`

  Type: `WebKitUserStyleLevel`

  A `WebKitUserStyleLevel`.

`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.

`allow_list`

  Type: 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`

  Type: 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

Type: `WebKitUserStyleSheet`

A new `WebKitUserStyleSheet`.

The caller of the function takes ownership of the data, and is responsible for freeing it.