Class (GI Struct)

WebKit-6.0WebKitWebExtensionMatchPatternSince 2.48

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.

2.48

Index

Constructors

Properties

Methods

  • Gets the host part of the pattern string, unless webkit_web_extension_match_pattern_get_matches_all_urls is true.

    Returns string

    The host string.

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

    Returns boolean

    Whether this match pattern matches all hosts.

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

    Returns boolean

    Whether this match pattern matches all URLs.

  • Gets the scheme part of the pattern string, unless webkit_web_extension_match_pattern_get_matches_all_urls is true.

    Returns string

    The scheme string.

  • Atomically releases a reference on the given matchPattern.

    If the reference was the last, the resources associated to the matchPattern are freed. This function is MT-safe and may be called from any thread.

    Returns void

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

    This method should be used to register any custom URL schemes used by the app for the extension base URLs, other than webkit-extension, or if extensions should have access to other supported URL schemes when using <all_urls>.

    Parameters

    • urlScheme: string

      The custom URL scheme to register

    Returns void