newForWorld

fun newForWorld(source: String, injectedFrames: UserContentInjectedFrames, injectionTime: UserScriptInjectionTime, worldName: String, allowList: List<String>? = null, blockList: List<String>? = null): UserScript

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

See webkit_user_script_new() for a full description.

Return

A new #WebKitUserScript

Since

2.22

Parameters

source

Source code of the user script.

injectedFrames

A #WebKitUserContentInjectedFrames value

injectionTime

A #WebKitUserScriptInjectionTime value

worldName

the name of a #WebKitScriptWorld

allowList

An allow_list of URI patterns or null

blockList

A block_list of URI patterns or null