3.19 <WebKitUserStyleSheet>

Structure: <WebKitUserStyleSheet>

A CSS style sheet which can be injected in loaded pages.

Procedures

Procedure: user-style-sheet:new source injected-frames level [allow-list] [block-list] ⇒ %return

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 #f 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.

source

Passed: a string.

Source code of the user style sheet.

injected-frames

Passed: a <WebKitUserContentInjectedFrames>, or one of its symbols.

A <WebKitUserContentInjectedFrames> value

level

Passed: a <WebKitUserStyleLevel>, or one of its symbols.

A <WebKitUserStyleLevel>

allow-list

Passed, or left out: a list or vector, each a string, or #f.

An allow_list of URI patterns or #f

block-list

Passed, or left out: a list or vector, each a string, or #f.

A block_list of URI patterns or #f

%return

Returned: a <WebKitUserStyleSheet>.

A new <WebKitUserStyleSheet>

Procedure: user-style-sheet:new-for-world source injected-frames level world-name [allow-list] [block-list] ⇒ %return

Creates a new user style sheet for script world.

Creates a new user style sheet for script world with name world-name. See user-style-sheet:new for a full description.

source

Passed: a string.

Source code of the user style sheet.

injected-frames

Passed: a <WebKitUserContentInjectedFrames>, or one of its symbols.

A <WebKitUserContentInjectedFrames> value

level

Passed: a <WebKitUserStyleLevel>, or one of its symbols.

A <WebKitUserStyleLevel>

world-name

Passed: a string.

the name of a WebKitScriptWorld

allow-list

Passed, or left out: a list or vector, each a string, or #f.

An allow_list of URI patterns or #f

block-list

Passed, or left out: a list or vector, each a string, or #f.

A block_list of URI patterns or #f

%return

Returned: a <WebKitUserStyleSheet>.

A new <WebKitUserStyleSheet>

Method: user-style-sheet:ref self ⇒ %return
Method: ref self ⇒ %return

Atomically increments the reference count of self by one.

This function is MT-safe and may be called from any thread.

self

Passed: a <WebKitUserStyleSheet>.

a <WebKitUserStyleSheet>

%return

Returned: a <WebKitUserStyleSheet>.

The passed <WebKitUserStyleSheet>

Method: user-style-sheet:unref self
Method: unref self

Atomically decrements the reference count of self by one.

If the reference count drops to 0, all memory allocated by <WebKitUserStyleSheet> is released. This function is MT-safe and may be called from any thread.

self

Passed: a <WebKitUserStyleSheet>.

a <WebKitUserStyleSheet>