Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/runtime/onbrowserupdateavailable/index.md
6552 views
------{{AddonSidebar}}{{Deprecated_header}}
Fired when an update for the browser is available, but it isn't installed immediately because a browser restart is required.
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
function: A callback function that will be called when this event occurs.
Browser compatibility
{{Compat}}
Examples
Listen for this event:
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.runtimeAPI. This documentation is derived fromruntime.jsonin the Chromium code.