Skip to content

Commit

Permalink
WebExtension tweaks for Safari and Manifest V3 (#17532)
Browse files Browse the repository at this point in the history
* Add better version specific notes for Safari support.

* Add Safari 16 version support for getFrameId and drop STP reference.

* Add more consistent manifest version availability notes.
* Features that are dropped in V3 noted as "Manifest V2 only".
* Features that are added in V3 noted as "Manifest V3 or later" to avoid prematurely limiting to V3 when future versions are supported.
* Features that are dropped in V3 by some browsers but are supported in full in others still noted as "Manifest V2 or later".

* More consistent use of required/optional instead of mandatory.
  • Loading branch information
xeenon committed Aug 23, 2022
1 parent b7f8163 commit 68cb7e9
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 87 deletions.
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."
},
"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",
"notes": "Mandatory before Firefox 48."
}
],
"firefox": {
"version_added": "42",
"notes": "Before Firefox 48, this property was required."
},
"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

0 comments on commit 68cb7e9

Please sign in to comment.