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

Proposal: expose more mv3 APIs to mv2 extensions #118

Open
carlosjeurissen opened this issue Oct 23, 2021 · 1 comment
Open

Proposal: expose more mv3 APIs to mv2 extensions #118

carlosjeurissen opened this issue Oct 23, 2021 · 1 comment
Labels
implemented: safari Implemented in Safari inconsistency Inconsistent behavior across browsers proposal Proposal for a change or new feature spec clarification Needs clarification when specified

Comments

@carlosjeurissen
Copy link
Contributor

carlosjeurissen commented Oct 23, 2021

Currently some new mv3 changes like the object notation for content_security_policy and background.service_worker are also available in mv2.

To ease transition, it would be very helpful if mv3 APIs can be exposed to mv2 extensions as well. There might be specific technical reasons why this hasn't been done before tho, if so, I would love to hear.

Some APIs which would benefit here are the new scripting API, like scripting.registerContentScripts. Also the action.getUserSettings of the action API would be very helpful for browserAction to get the pinned state of extensions.

Feature detection can then be used to check if it's available. Something like:

if (browser.scripting) {
  
} else {
  // use some fallback like browser.tabs.executeScript
}

This raises the question why for some of these APIs a new manifest version is required in general.

@xeenon xeenon added inconsistency Inconsistent behavior across browsers spec clarification Needs clarification when specified labels Oct 25, 2021
@xeenon xeenon added the proposal Proposal for a change or new feature label Aug 31, 2022
@xeenon
Copy link
Collaborator

xeenon commented Sep 1, 2022

Safari is shipping support for browser.scripting and service_worker support in v2 and v3 extensions in Safari 15.4. We did not version lock anything other than the browser.action rename.

@xeenon xeenon added the implemented: safari Implemented in Safari label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implemented: safari Implemented in Safari inconsistency Inconsistent behavior across browsers proposal Proposal for a change or new feature spec clarification Needs clarification when specified
Projects
None yet
Development

No branches or pull requests

2 participants