-
Notifications
You must be signed in to change notification settings - Fork 148
Update MV3 migration advice #2249
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
base: master
Are you sure you want to change the base?
Conversation
Rob--W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently missing from documentation:
- fetch and XHR in content scripts no longer allow cross-origin requests through extension permissions. Instead, the destination server should use CORS, or the extension has to send a message to go the background page (or an extension tab or frame) instead, to ask it to make a request on behalf of the content script. This changed in https://bugzilla.mozilla.org/show_bug.cgi?id=1578405
- userScripts API of MV2 differs from userScripts API in MV3 (maybe one small note in the scripting section? Also emphasize that the AMO only approves of the use of the API for user script managers only)
- CSP section should also mention that it now includes
upgrade-insecure-requestsby default, see https://bugzilla.mozilla.org/show_bug.cgi?id=1797086
Although not specific to MV3, should we mention the data_collection_permissions requirement for visibility? (While emphasizing that it is also needed in MV2). I haven't put too much thought into it, the question just crossed my mind.
|
|
||
| Two features of the `extension` API are deprecated in Manifest V2 and no longer available in Manifest V3, but have alternatives: | ||
|
|
||
| - [`extension.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getURL), use [`runtime.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/lastError) instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - [`extension.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getURL), use [`runtime.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/lastError) instead. | |
| - [`extension.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/lastError), use [`runtime.lastError`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/lastError) instead. |
Fixed typo in URL
| {% endcapture %} | ||
|
|
||
| {% include modules/one-column.liquid, | ||
| id: "removed- apis" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| id: "removed- apis" | |
| id: "removed-apis" |
Assuming that the extraneous space was a mistake.
|
|
||
| {% capture content %} | ||
|
|
||
| ### Extension API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Extension API | |
| ### Removed APIs |
"Extension" API sounds too general, adjusted to match the identifier you listed below (also to allow for other content to fit).
"Other changes", "Other deprecations", etc would also work, I don't have strong preferences either way.
Implement the following updates:
extension.lastErrorwithruntime.lastErrorandextension.getURLwithruntime.getURL.