WebKit2.UserStyleSheet.new
function new(source: String, injected_frames: WebKit2.UserContentInjectedFrames, level: WebKit2.UserStyleLevel, whitelist: Array(String), blacklist: Array(String)): WebKit2.UserStyleSheet { // Gjs wrapper for webkit_user_style_sheet_new() }
Creates a new user style sheet. Style sheets can be applied to some URIs only by passing non-null values for whitelist or blacklist. Passing a null whitelist implies that all URIs are on the whitelist. The style sheet is applied if an URI matches the whitelist and not the blacklist. 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
- source
Source code of the user style sheet.
- injected_frames
- level
- whitelist
A whitelist of URI patterns or null
- blacklist
A blacklist of URI patterns or null
- Returns
A new WebKit2.UserStyleSheet