webkit.web_extension_match_pattern

Module for [WebExtensionMatchPattern] class

Types 1

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.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
WebExtensionMatchPattern self() nothrowReturns `this`, for use in `with` statements.
webkit.web_extension_match_pattern.WebExtensionMatchPattern newAllHostsAndSchemes() static nothrowReturns a new #WebKitWebExtensionMatchPattern that has `*` for scheme, host, and path. Returns: a newly created #WebKitWebExtensionMatchPattern
webkit.web_extension_match_pattern.WebExtensionMatchPattern newAllUrls() static nothrowReturns a new #WebKitWebExtensionMatchPattern for `<all_urls>`. Returns: a newly created #WebKitWebExtensionMatchPattern
webkit.web_extension_match_pattern.WebExtensionMatchPattern newWithScheme(string scheme, string host, string path) staticReturns a new #WebKitWebExtensionMatchPattern for the specified scheme, host, and path strings.
webkit.web_extension_match_pattern.WebExtensionMatchPattern newWithString(string string_) staticReturns a new #WebKitWebExtensionMatchPattern for the specified string.
string getHost() nothrowGets the host part of the pattern string, unless [webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls] is true. Returns: The host string.
bool getMatchesAllHosts() nothrowGets whether the match pattern matches all host. This happens when the pattern is `<all_urls>`, or if `*` is set as the host string. Returns: Whether this match pattern matches all hosts.
bool getMatchesAllUrls() nothrowGets whether the match pattern matches all URLs, in other words, whether the pattern is `<all_urls>`. Returns: Whether this match pattern matches all URLs.
string getPath() nothrowGets the path part of the pattern string, unless [webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls] is true. Returns: The path string.
string getScheme() nothrowGets the scheme part of the pattern string, unless [webkit.web_extension_match_pattern.WebExtensionMatchPattern.getMatchesAllUrls] is true. Returns: The scheme string.
string getString() nothrowGets the original pattern string. Returns: The original pattern string.
bool matchesPattern(webkit.web_extension_match_pattern.WebExtensionMatchPattern pattern, webkit.types.WebExtensionMatchPatternOptions options) nothrowMatches the matchPattern against the specified pattern with options.
bool matchesUrl(string url, webkit.types.WebExtensionMatchPatternOptions options) nothrowMatches the matchPattern against the specified URL with options.
void registerCustomURLScheme(string urlScheme) static nothrowRegisters a custom URL scheme that can be used in match patterns.
Constructors
this(void * ptr, Flag!"Take" take)