Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the different ways that "matches patterns" are used #36971

Open
dotproto opened this issue Nov 26, 2024 · 0 comments
Open

Clarify the different ways that "matches patterns" are used #36971

dotproto opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
Content:WebExt WebExtensions docs

Comments

@dotproto
Copy link
Collaborator

Derived from a comment by @dotproto in #36069 (review)

While reviewing PR #36069 I realized that my feedback was focused on how match patterns are used for (optional) host permissions declarations in the extension manifest. Unfortunately, that's just one of several ways that match patterns are used in extensions.

This is a non-exhaustive list of WebExtensions API surfaces that use match patterns. At the moment the exact differences between how these various surfaces use match patterns is unclear.

  1. host permissions declared in the host_permissions and optional_host_permissions manifest fields.

  2. the matches field of content script declarations

  3. the matches as used in entries of the web_accessible_resources manifest field (MV3 only).

  4. In the hide_matches and show_matches fields of the page_action manifest field.

  5. the url field of the webRequest.RequestFilter object.

  6. the url field of the filter object passed to tabs.onUpdated().

  7. the url field of the options argument passed to tabs.query()

  8. the matches field of the generic UrlFilter object.

This list is non-exhaustive. I should go through searchfox.org and cs.chromium.org to look for additional uses I may have missed.

@dotproto dotproto self-assigned this Nov 26, 2024
@github-actions github-actions bot added the Content:WebExt WebExtensions docs label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebExt WebExtensions docs
Projects
None yet
Development

No branches or pull requests

1 participant