WebKit.WebExtensionMatchPattern
Description: Reference for WebKit.WebExtensionMatchPattern

### Struct

# WebKitWebExtensionMatchPattern

since: 2.48

#### Description [src]

    struct WebKitWebExtensionMatchPattern {
      /* No available fields */
    }

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`.

Available since: 2.48

#### Constructors

###### webkit_web_extension_match_pattern_new_all_hosts_and_schemes

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

since: 2.48

###### webkit_web_extension_match_pattern_new_all_urls

Returns a new `WebKitWebExtensionMatchPattern` for `<all_urls>`.

since: 2.48

###### webkit_web_extension_match_pattern_new_with_scheme

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

since: 2.48

###### webkit_web_extension_match_pattern_new_with_string

Returns a new `WebKitWebExtensionMatchPattern` for the specified `string`.

since: 2.48

#### Functions

###### webkit_web_extension_match_pattern_register_custom_URL_scheme

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

deprecated: 2.52 since: 2.48

###### webkit_web_extension_match_pattern_register_custom_url_scheme

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

since: 2.52

#### Instance methods

###### webkit_web_extension_match_pattern_get_host

Gets the host part of the pattern string, unless `webkit_web_extension_match_pattern_get_matches_all_urls` is `TRUE`.

since: 2.48

###### webkit_web_extension_match_pattern_get_matches_all_hosts

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

since: 2.48

###### webkit_web_extension_match_pattern_get_matches_all_urls

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

since: 2.48

###### webkit_web_extension_match_pattern_get_path

Gets the path part of the pattern string, unless `webkit_web_extension_match_pattern_get_matches_all_urls()` is `TRUE`.

since: 2.48

###### webkit_web_extension_match_pattern_get_scheme

Gets the scheme part of the pattern string, unless `webkit_web_extension_match_pattern_get_matches_all_urls` is `TRUE`.

since: 2.48

###### webkit_web_extension_match_pattern_get_string

Gets the original pattern string.

since: 2.48

###### webkit_web_extension_match_pattern_matches_pattern

Matches the `matchPattern` against the specified `pattern` with options.

since: 2.48

###### webkit_web_extension_match_pattern_matches_url

Matches the `matchPattern` against the specified URL with options.

since: 2.48

###### webkit_web_extension_match_pattern_ref

Atomically acquires a reference on the given `matchPattern`.

since: 2.48

###### webkit_web_extension_match_pattern_unref

Atomically releases a reference on the given `matchPattern`.

since: 2.48