UserStyleSheet

constructor(    source: String,     injectedFrames: UserContentInjectedFrames,     level: UserStyleLevel,     allowList: List<String>? = null,     blockList: List<String>? = null)(source)

Creates a new user style sheet.

Style sheets can be applied to some URIs only by passing non-null values for @allow_list or @block_list. Passing a null allow_list implies that all URIs are on the allow_list. The style sheet is applied if an URI matches the allow_list and not the block_list. URI patterns must be of the form [protocol]://[host]/[path], where the host and path components can contain the wildcard character (*) to represent zero or more other characters.

Return

A new #WebKitUserStyleSheet

Since

2.6

Parameters

source

Source code of the user style sheet.

injectedFrames

A #WebKitUserContentInjectedFrames value

level

A #WebKitUserStyleLevel

allowList

An allow_list of URI patterns or null

blockList

A block_list of URI patterns or null


constructor(    source: String,     injectedFrames: UserContentInjectedFrames,     level: UserStyleLevel,     worldName: String,     allowList: List<String>? = null,     blockList: List<String>? = null)(source)

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.

Return

A new #WebKitUserStyleSheet

Since

2.22

Parameters

source

Source code of the user style sheet.

injectedFrames

A #WebKitUserContentInjectedFrames value

level

A #WebKitUserStyleLevel

worldName

the name of a #WebKitScriptWorld

allowList

An allow_list of URI patterns or null

blockList

A block_list of URI patterns or null


constructor(webkitUserStyleSheetPointer: <Error class: unknown class><<Error class: unknown class>>)(source)