Skip to content

Commit

Permalink
Support for persistAcrossSessions (mdn#19196)
Browse files Browse the repository at this point in the history
* Rupport for persistAcrossSessions

* Persist into future sessions clarification
  • Loading branch information
rebloor committed Aug 11, 2022
1 parent 2e96d87 commit 92790ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Values of this type are objects. They contain these properties:
- `matches` {{optional_inline}}
- : `array` of `string`. Array of the pages this content script is injected into. Must be specified for {{WebExtAPIRef("scripting.registerContentScripts()")}}.
- `persistAcrossSessions` {{optional_inline}}
- : `boolean`. Specifies if this content script persists into future sessions. Defaults to `true`. Firefox does not support registering persistent scripts, see ({{bug("1751436")}}), so this flag must be set to `false` to register non-persistent scripts.
- : `boolean`. Specifies if this content script persists across browser restarts and updates and extension restarts. Defaults to `true`.
- `runAt` {{optional_inline}}
- : {{WebExtAPIRef("extensionTypes.RunAt")}}. Specifies when JavaScript files are injected into the web page. The default value is `document_idle`. In Firefox, `runAt` also affects the point where the CSS is inserted. In Chrome, `runAt` does not affect the CSS insertion point.

Expand Down
2 changes: 2 additions & 0 deletions files/en-us/mozilla/firefox/releases/105/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ This article provides information about the changes in Firefox 105 that will aff

## Changes for add-on developers

- Support for defining persistent scripts using {{WebExtAPIRef("scripting")}} has been added. A script is identified as persistent using the `persistAcrossSessions` property in {{WebExtAPIRef("scripting.RegisteredContentScript")}} ({{bug("1751436")}}).

#### Removals

### Other
Expand Down

0 comments on commit 92790ac

Please sign in to comment.