Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/runtime/onsuspendcanceled/index.md
6565 views
------{{AddonSidebar()}}
Sent after {{WebExtAPIRef("runtime.onSuspend")}} to indicate that the app won't be unloaded after all.
Syntax
Events have three functions:
addListener(callback): Adds a listener to this event.
removeListener(listener): Stop listening to this event. The
listenerargument is the listener to remove.
hasListener(listener): Checks whether a
listeneris registered for this event. Returnstrueif it is listening,falseotherwise.
addListener syntax
Parameters
callback: Function that will be called when this event occurs.
Browser compatibility
{{Compat}}
Examples
Listen for SuspendCanceled events:
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.runtimeAPI. This documentation is derived fromruntime.jsonin the Chromium code.