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

optional_permissions: browsingData - Chrome BCD #20858

Closed
erosman opened this issue Oct 2, 2023 · 0 comments · Fixed by #22034
Closed

optional_permissions: browsingData - Chrome BCD #20858

erosman opened this issue Oct 2, 2023 · 0 comments · Fixed by #22034
Labels
data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions good first issue Good issues for getting started with this project.

Comments

@erosman
Copy link
Contributor

erosman commented Oct 2, 2023

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

In practice, Chrome appears to support "browsingData" as an "optional_permissions".

What browsers does this problem apply to, if applicable?

Chrome

What did you expect to see?

Chrome supports "browsingData" as an "optional_permissions"

Did you test this? If so, how?

It was noticed during the development of FoxyProxy v8.0.
I have introduced the "optional_permissions" over a month ago so I am not aware when the support was added. It has been tested on the official releases only.
Please note that in Chrome, the permission is granted silently, without a user prompt.

manifest.json

  "optional_permissions": [
    "browsingData",
    "privacy"
  ],

options.js

this.permission = await browser.permissions.contains({permissions: ['browsingData']});
// returns false on both Chrome & Firefox

if (!this.permission) {
  // request permission
  // Chrome appears to return true without a popup request
  this.permission = await browser.permissions.request({permissions: ['browsingData']});
  if (!this.permission) { return; }
}

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No response

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions

MDN metadata

No response

@queengooborg queengooborg added the data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions label Oct 2, 2023
@rebloor rebloor added good first issue Good issues for getting started with this project. and removed needs triage 🔎 labels Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions good first issue Good issues for getting started with this project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@queengooborg @erosman @rebloor and others