[WebExtensions] alarms.create() argument persistAcrossSessons - #45712
Open
bershanskiy wants to merge 1 commit into
Open
bershanskiy wants to merge 1 commit into
bershanskiy wants to merge 1 commit into
Conversation
bershanskiy
requested review from
willdurand
and removed request for
a team
September 14, 2026 19:03
Contributor
|
Preview URLs (1 page) External URLs (1)URL:
(comment last updated: 2026-09-29 10:30:26) |
bershanskiy
commented
Sep 14, 2026
| - `periodInMinutes` {{optional_inline}} | ||
| - : `double`. If this is specified, the alarm will fire again every `periodInMinutes` after its initial firing. If you specify this value you may omit both `when` and `delayInMinutes`, and the alarm will then fire initially after `periodInMinutes`. If `periodInMinutes` is not specified, the alarm will only fire once. | ||
| - `persistAcrossSessions` {{optional_inline}} | ||
| - : `boolean`. Whether alarm should persist across (profile) browsing sessions. Set this to `true` to persist alarm until the extension updates. Set to `false` to clear alarm when the extension is reloaded or updated or the browser restarts. If browser does not support profiles, then browsing session lasts from the moment the first browsing window opens until the last one closes. If browser supports profiles, then closing all windows belonging to the same (non-incognito) profile will terminate the profile browsing session, even if another profile has an active browsing session. As of September 2026, only Chrome 150+ supports this attribute, but other browsers may implement it later. In Chrome, this attribute defaults to `true` to match prior behavior. Other browsers, namely Firefox, may implement this attribute with default value of `false` to match current behavior (Firefox clears alarms across sessions). See [this discussion](https://github.com/w3c/webextensions/issues/406) for details. |
Contributor
Author
There was a problem hiding this comment.
This paragraph is a bit heavy with technical details, but I don't think I can cut anything out. In particular, it should mention that (1) only Chromium supports this key, (2) non-persistent alarms get cleared when profile gets closed (even if a browser is open with a different profile), (3) browsers have different defaults.
oliverdunk
reviewed
Sep 16, 2026
oliverdunk
left a comment
Contributor
There was a problem hiding this comment.
The technical details here seem correct, but I defer to MDN folk on how to word this in a way which is understandable.
Contributor
Author
|
Should I do anything to advance this PR? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Document WebExtensions alarm parameter
persistAcrossSessions.Motivation
Cool feature in Chrome and other browsers expressed interest in implementing it too.
Additional details
WECG discussion: w3c/webextensions#406
Chromium commit: chromium/chromium@900c2b0
Chromium bug: https://issues.chromium.org/issues/40815223
Chromium documentation: https://developer.chrome.com/docs/extensions/reference/api/alarms
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1995451
Related issues and pull requests
CC @oliverdunk