WebExtensionMatchPattern

Represents a way to specify a group of URLs for use in WebExtensions.

All match patterns are specified as strings. Apart from the special <all_urls> pattern, match patterns consist of three parts: scheme, host, and path.

Generally, match patterns are returned from a #WebKitWebExtension.

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

cPtr
void* cPtr(Flag!"Dup" dup)
getHost
string getHost()

Gets the host part of the pattern string, unless webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls is true.

getMatchesAllHosts
bool getMatchesAllHosts()

Gets whether the match pattern matches all host. This happens when the pattern is <all_urls>, or if * is set as the host string.

getMatchesAllUrls
bool getMatchesAllUrls()

Gets whether the match pattern matches all URLs, in other words, whether the pattern is <all_urls>.

getPath
string getPath()

Gets the path part of the pattern string, unless webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls is true.

getScheme
string getScheme()

Gets the scheme part of the pattern string, unless webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls is true.

getString
string getString()

Gets the original pattern string.

matchesPattern
bool matchesPattern(webkit.web_extension_match_pattern.WebExtensionMatchPattern pattern, webkit.types.WebExtensionMatchPatternOptions options)

Matches the matchPattern against the specified pattern with options.

matchesUrl
bool matchesUrl(string url, webkit.types.WebExtensionMatchPatternOptions options)

Matches the matchPattern against the specified URL with options.

self
WebExtensionMatchPattern self()

Returns this, for use in with statements.

Properties

gType
GType gType [@property getter]

Static functions

getGType
GType getGType()
newAllHostsAndSchemes
webkit.web_extension_match_pattern.WebExtensionMatchPattern newAllHostsAndSchemes()

Returns a new #WebKitWebExtensionMatchPattern that has * for scheme, host, and path.

newAllUrls
webkit.web_extension_match_pattern.WebExtensionMatchPattern newAllUrls()

Returns a new #WebKitWebExtensionMatchPattern for <all_urls>.

newWithScheme
webkit.web_extension_match_pattern.WebExtensionMatchPattern newWithScheme(string scheme, string host, string path)

Returns a new #WebKitWebExtensionMatchPattern for the specified scheme, host, and path strings.

newWithString
webkit.web_extension_match_pattern.WebExtensionMatchPattern newWithString(string string_)

Returns a new #WebKitWebExtensionMatchPattern for the specified string.

registerCustomURLScheme
void registerCustomURLScheme(string urlScheme)

Registers a custom URL scheme that can be used in match patterns.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.