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

WebExtension tweaks for Safari and Manifest V3 #17532

Merged
merged 4 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 26 additions & 13 deletions webextensions/api/runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,9 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": false,
"notes": "Available in Safari Technology Preview 142."
"version_added": "16"
},
"safari_ios": {
"version_added": false
}
"safari_ios": "mirror"
}
}
},
Expand Down Expand Up @@ -862,14 +859,30 @@
},
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"notes": "In Safari 14, this event is fired in response to a message from an extension's containing app. In Safari 15.4 and later, this event is also fired in response to a message from webpages.",
"version_added": "14"
},
"safari_ios": {
"notes": "In Safari 15, this event is fired in response to a message from an extension's containing app. In Safari 15.4 and later, this event is also fired in response to a message from webpages.",
"version_added": "15"
}
"safari": [
{
"version_added": "15.4",
"partial_implementation": true,
"notes": "Since Safari 15.4, this event is also fired in response to a message from webpages allowed in <a href='https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/externally_connectable'><code>externally_connectable</code></a>."
},
{
"version_added": "14",
"partial_implementation": true,
"notes": "This event is only fired in response to a message from an extension's containing app, not webpages nor other extensions."
}
],
"safari_ios": [
{
"version_added": "15.4",
"partial_implementation": true,
"notes": "Since Safari 15.4, this event is also fired in response to a message from webpages allowed in <a href='https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/externally_connectable'><code>externally_connectable</code></a>."
},
{
"version_added": "15",
"partial_implementation": true,
"notes": "This event is only fired in response to a message from an extension's containing app, not webpages nor other extensions."
}
]
}
},
"return_promise": {
Expand Down
6 changes: 4 additions & 2 deletions webextensions/api/scripting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"mdn_url": "https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/scripting/InjectionTarget",
"support": {
"chrome": {
"version_added": "88"
"version_added": "88",
"notes": "Available for use in Manifest V3 or later."
xeenon marked this conversation as resolved.
Show resolved Hide resolved
},
"edge": "mirror",
"firefox": {
Expand All @@ -16,7 +17,8 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": "15.4"
"version_added": "15.4",
"notes": "Available for use in Manifest V2 or later."
},
"safari_ios": "mirror"
}
Expand Down
38 changes: 19 additions & 19 deletions webextensions/api/tabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1336,14 +1336,14 @@
"safari": {
"notes": [
"The default file format is 'jpeg'.",
"<code>&lt;all_urls&gt;</code> permission is not required to call this."
"<code>&lt;all_urls&gt;</code> permission is optional."
],
"version_added": "14"
},
"safari_ios": {
"notes": [
"The default file format is 'jpeg'.",
"<code>&lt;all_urls&gt;</code> permission is not required to call this."
"<code>&lt;all_urls&gt;</code> permission is optional."
],
"version_added": "15"
}
Expand Down Expand Up @@ -1855,32 +1855,32 @@
"version_added": true,
"notes": [
"Extensions can't inject scripts into their own pages using this API.",
"Not available for use in Manifest V3."
"Available for use in Manifest V2 only."
]
},
"edge": {
"version_added": "14",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"firefox": {
"version_added": "43",
"notes": [
"Before version 50, Firefox would pass a single result value into its callback rather than an array, unless 'allFrames' had been set.",
"Not available for use in Manifest V3."
"Available for use in Manifest V2 only."
]
},
"firefox_android": {
"version_added": "54",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"opera": "mirror",
"safari": {
"version_added": "14",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"safari_ios": {
"version_added": "15",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
}
}
},
Expand Down Expand Up @@ -2227,28 +2227,28 @@
"support": {
"chrome": {
"version_added": true,
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"edge": {
"version_added": "14",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"firefox": {
"version_added": "47",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"firefox_android": {
"version_added": "54",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"opera": "mirror",
"safari": {
"version_added": "14",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"safari_ios": {
"version_added": "15",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
}
}
},
Expand Down Expand Up @@ -3544,25 +3544,25 @@
"support": {
"chrome": {
"version_added": "87",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"edge": "mirror",
"firefox": {
"version_added": "49",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"firefox_android": {
"version_added": "54",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"opera": "mirror",
"safari": {
"version_added": "14",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
},
"safari_ios": {
"version_added": "15",
"notes": "Not available for use in Manifest V3."
"notes": "Available for use in Manifest V2 only."
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion webextensions/manifest/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"edge": {
"version_added": "14",
"notes": "This key is mandatory in Microsoft Edge."
"notes": "This property is required."
},
"firefox": {
"version_added": "52"
Expand Down
75 changes: 59 additions & 16 deletions webextensions/manifest/background.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"__compat": {
"support": {
"chrome": {
"version_added": true
"version_added": true,
"notes": "Available for use in Manifest V2 only."
},
"edge": {
"version_added": "14"
Expand All @@ -39,10 +40,12 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": "14"
"version_added": "14",
"notes": "Available for use in Manifest V2 or later."
},
"safari_ios": {
"version_added": "15"
"version_added": "15",
"notes": "Available for use in Manifest V2 or later."
}
}
}
Expand All @@ -51,11 +54,12 @@
"__compat": {
"support": {
"chrome": {
"version_added": true
"version_added": true,
"notes": "Available for use in Manifest V2 only."
},
"edge": {
"version_added": "14",
"notes": "The 'persistent' property is mandatory."
"notes": "This property is required."
},
"firefox": {
"version_added": "48",
Expand All @@ -66,22 +70,38 @@
},
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"notes": "Before 14.1, only persistent pages are supported.",
"version_added": "14"
},
"safari_ios": {
"notes": "Only non-persistent pages are supported. Requires <code>persistent: false</code>.",
"version_added": "15"
}
"safari": [
{
"version_added": "14.1",
"notes": "Since Safari 15.4, ignored if <code>service_worker</code> is used."
},
{
"version_added": "14",
"partial_implementation": true,
"notes": "Only persistent pages are supported."
}
],
"safari_ios": [
{
"notes": "Only non-persistent pages are supported. Requires <code>persistent: false</code> or <code>service_worker</code>.",
"partial_implementation": true,
"version_added": "15.4"
},
{
"notes": "Only non-persistent pages are supported. Requires <code>persistent: false</code>.",
"partial_implementation": true,
"version_added": "15"
}
]
}
}
},
"scripts": {
"__compat": {
"support": {
"chrome": {
"version_added": true
"version_added": true,
"notes": "Available for use in Manifest V2 only."
},
"edge": {
"version_added": "14"
Expand All @@ -93,13 +113,36 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": "14"
"version_added": "14",
"notes": "Available for use in Manifest V2 or later."
},
"safari_ios": {
"version_added": "15"
"version_added": "15",
"notes": "Available for use in Manifest V2 or later."
}
}
}
},
"service_worker": {
"__compat": {
"support": {
"chrome": {
"version_added": "88",
"notes": "Available for use in Manifest V2 or later."
},
"edge": "mirror",
"firefox": {
"version_added": false
},
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": "15.4",
"notes": "Available for use in Manifest V2 or later."
},
"safari_ios": "mirror"
}
}
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions webextensions/manifest/browser_specific_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
"version_added": "15",
"version_removed": "79"
},
"firefox": [
{
"version_added": "48"
},
{
"version_added": "42",
"alternative_name": "applications",
Copy link
Contributor Author

@xeenon xeenon Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alternative_name was a dummy entry to allow per-version notes here. I removed it to avoid confusion.

"notes": "Mandatory before Firefox 48."
}
],
"firefox": {
"version_added": "42",
"notes": "Before Firefox 48, this property was required."
},
Comment on lines -24 to +18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been changed? This breaks some of our tools and it took me a while to figure that out since it is not mentioned anywhere in the changelog. This patch is for Safari, it would have been good to not change Firefox data or to move these changes to a separate issue/PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is actually for Manifest V3 entirely as well, and if you look at the diff, you'll notice that this is simply consolidating the statements together to adhere to the typical structure of BCD (where a behavioral difference that only applies to one browser should be a single note, rather than two separated statements).

We apologize in advance for the changes causing an issue with your tooling; however, please do note that features may be added, removed or modified at any time to match developer interest, BCD data guidelines, or for better accuracy, as explained in the Semantic versioning policy. In other words, changes such as this are expected to happen in any release and will not result in any changelog notes.

"firefox_android": "mirror",
"opera": "mirror",
"safari": {
Expand Down
13 changes: 10 additions & 3 deletions webextensions/manifest/chrome_url_overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@
"opera": {
"version_added": false
},
"safari": {
"version_added": "14.1"
},
"safari": [
{
"version_added": "14.1"
},
{
"alternative_name": "browser_url_overrides",
"version_added": "15"
}
],
"safari_ios": {
"alternative_name": "browser_url_overrides",
"version_added": "15"
}
}
Expand Down
9 changes: 3 additions & 6 deletions webextensions/manifest/content_security_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
"support": {
"chrome": {
"version_added": "88",
"notes": [
"Available in Canary builds.",
"Available to Manifest V3 only."
]
"notes": "Available for use in Manifest V3 or later."
},
"edge": "mirror",
"firefox": {
Expand All @@ -53,11 +50,11 @@
"firefox_android": "mirror",
"opera": {
"version_added": "74",
"notes": "Available to Manifest V3 only."
"notes": "Available for use in Manifest V3 or later."
},
"safari": {
"version_added": "15.4",
"notes": "Available to Manifest V3 only."
"notes": "Available for use in Manifest V3 or later."
},
"safari_ios": "mirror"
}
Expand Down