UserScript.this

Creates a new user script. Scripts 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 script 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.

  1. this(WebKitUserScript* webKitUserScript, bool ownedRef)
  2. this(string source, WebKitUserContentInjectedFrames injectedFrames, WebKitUserScriptInjectionTime injectionTime, string[] allowList, string[] blockList)
    class UserScript
    this
    (
    string source
    ,
    WebKitUserContentInjectedFrames injectedFrames
    ,
    WebKitUserScriptInjectionTime injectionTime
    ,
    string[] allowList
    ,
    string[] blockList
    )
  3. this(string source, WebKitUserContentInjectedFrames injectedFrames, WebKitUserScriptInjectionTime injectionTime, string worldName, string[] allowList, string[] blockList)

Parameters

source string

Source code of the user script.

injectedFrames WebKitUserContentInjectedFrames

A #WebKitUserContentInjectedFrames value

injectionTime WebKitUserScriptInjectionTime

A #WebKitUserScriptInjectionTime value

allowList string[]

An allow_list of URI patterns or %NULL

blockList string[]

A block_list of URI patterns or %NULL

Return Value

A new #WebKitUserScript

Throws

ConstructionException GTK+ fails to create the object.

Meta