Skip to content

Commit a8ba5c3

Browse files
authored
Safari precedence for background pages and scripts (mdn#38635)
* Safari presidence for background pages and scripts * Grammar fix
1 parent a1ac64f commit a8ba5c3

File tree

1 file changed

+1
-2
lines changed
  • files/en-us/mozilla/add-ons/webextensions/manifest.json/background

1 file changed

+1
-2
lines changed

files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ Support for the `scripts`, `page`, and `service_worker` properties varies betwee
186186
- `background.service_worker` is not supported (see [Firefox bug 1573659](https://bugzil.la/1573659)).
187187
- supports `background.scripts` (or `background.page`) if `service_worker` is not specified or the service worker feature is disabled. Before Firefox 120, Firefox did not start the background page if `service_worker` was present (see [Firefox bug 1860304](https://bugzil.la/1860304)). From Firefox 121, the background page starts as expected, regardless of the presence of `service_worker`.
188188
- Safari:
189-
- supports `background.service_worker`.
190-
- supports `background.scripts` (or `background.page`) if `service_worker` is not specified.
189+
- supports `background.scripts` (or `background.page`) and `background.service_worker`. If both are specified, uses `background.scripts` (or `background.page`), unless `preferred_environment` is set to `service_worker`.
191190

192191
To illustrate, this is an example of a cross-browser extension that supports `scripts` and `service_worker`. The example has this manifest.json file:
193192

0 commit comments

Comments
 (0)