Closed Bug 1753850 Opened 2 years ago Closed 2 years ago

implement runtime.onSuspend

Categories

(WebExtensions :: Compatibility, enhancement, P3)

enhancement

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

(Keywords: dev-doc-complete, Whiteboard: [addons-jira])

Attachments

(1 file)

runtime.onSuspend is called when an event page is about to be suspended.

See https://developer.chrome.com/docs/extensions/mv2/background_pages/

Assignee: nobody → mixedpuppy
Status: NEW → ASSIGNED
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ca972dfa3d8
implement runtime.onSuspend for non-persistent background r=rpl,robwu
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e58ef84da469
implement runtime.onSuspend for non-persistent background r=rpl,robwu
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Flags: needinfo?(mixedpuppy)

The mdn/content articles already existed years before the implementation in Firefox, since the API was part of Chrome's extension API:

The compatibility information has been added at:

The release notes of 100 was updated at:

I did note the following caveat: The "event page" feature itself was not enabled by default until Firefox 106 (bug 1788108). So while extensions can already try to register event listeners for these, in practice the events would not fire until the extension has enabled support for event pages by adding "persistent": false AND the browser supports event pages (i.e. Firefox 106+).
Technically, the API would still be correct when it never fires the event, since an event page is allowed to, but not required to suspend.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: