gi-webkit2-4.0.28: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Structs.UserScript

Description

No description available in the introspection data.

Synopsis

Exported types

newtype UserScript Source #

Memory-managed wrapper type.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

ref, unref.

Getters

None.

Setters

None.

new

userScriptNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

source: Source code of the user script.

-> UserContentInjectedFrames

injectedFrames: A UserContentInjectedFrames value

-> UserScriptInjectionTime

injectionTime: A UserScriptInjectionTime value

-> Maybe [Text]

allowList: An allow_list of URI patterns or Nothing

-> Maybe [Text]

blockList: A block_list of URI patterns or Nothing

-> m UserScript

Returns: A new UserScript

Creates a new user script. Scripts can be applied to some URIs only by passing non-null values for allowList or blockList. Passing a Nothing 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.

Since: 2.6

newForWorld

userScriptNewForWorld Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

source: Source code of the user script.

-> UserContentInjectedFrames

injectedFrames: A UserContentInjectedFrames value

-> UserScriptInjectionTime

injectionTime: A UserScriptInjectionTime value

-> Text

worldName: the name of a WebKitScriptWorld

-> Maybe [Text]

allowList: An allow_list of URI patterns or Nothing

-> Maybe [Text]

blockList: A block_list of URI patterns or Nothing

-> m UserScript

Returns: A new UserScript

Creates a new user script for script world with name worldName. See userScriptNew for a full description.

Since: 2.22

ref

userScriptRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UserScript

userScript: a UserScript

-> m UserScript

Returns: The passed UserScript

Atomically increments the reference count of userScript by one. This function is MT-safe and may be called from any thread.

Since: 2.6

unref

userScriptUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UserScript

userScript: a UserScript

-> m () 

Atomically decrements the reference count of userScript by one. If the reference count drops to 0, all memory allocated by UserScript is released. This function is MT-safe and may be called from any thread.

Since: 2.6