MDN’s new design is in Beta! A sneak peek:

Fired when one or more items change.


Events have three functions:

Adds a listener to this event.
Stop listening to this event. The listener argument is the listener to remove.
Check whether listener is registered for this event. Returns true if it is listening, false otherwise.

addListener syntax



Function that will be called when this event occurs. The function will be passed the following arguments:

object. Object describing the change. This contains one property for each key that changed. The name of the property is the name of the key that changed, and its value is a storage.StorageChange object describing the change to that item.
string. The name of the storage area ("sync", "local" or "managed") to which the changes were made.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic supportYesYes4548Yes


Log the storage area that changed,
then for each item changed,
log its old value and its new value.
function logStorageChange(changes, area) {
  console.log("Change in storage area: " + area);
  var changedItems = Object.keys(changes);
  for (var item of changedItems) {
    console.log(item + " has changed:");
    console.log("Old value: ");
    console.log("New value: ");

Example Add-ons


This API is based on Chromium's API. This documentation is derived from storage.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Rob W, wbamberg, Makyen, chrisdavidmills
 Last updated by: Rob W,