This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The StorageEvent interface is implemented by the storage event, which is sent to a window when a storage area the window has access to is changed within the context of another document.
StorageEvent()Returns a newly constructed StorageEvent object.
In addition to the properties listed below, this interface inherits the properties of its parent interface, Event.
key Read only
Returns a string with the key for the storage item that was changed. The key attribute is null when the change is caused by the storage clear() method.
newValue Read only
Returns a string with the new value of the storage item that was changed. This value is null when the change has been invoked by storage clear() method, or the storage item has been removed from the storage.
oldValue Read only
Returns a string with the original value of the storage item that was changed. This value is null when the storage item has been newly added and therefore doesn't have any previous value.
storageArea Read only
Returns a Storage object that represents the storage object that was affected.
url Read only
Returns string with the URL of the document whose storage changed.
In addition to the methods listed below, this interface inherits the methods of its parent interface, Event.
initStorageEvent() Deprecated
Initializes the event in a manner analogous to the similarly-named initEvent() method in the DOM Events interfaces. Use the constructor instead.
| Specification |
|---|
| HTML> # the-storageevent-interface> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
StorageEvent |
17 | 17 | 13 | 15 | 6 | 18 | 14 | 14 | 6 | 1.0 | 4.4 | 6 |
StorageEvent |
1 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 3 | 3 |
initStorageEvent |
4 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
key |
1 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
newValue |
1 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
oldValue |
1 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
storageArea |
3 | 12 | 13 | ≤12.1 | 4 | 18 | 14 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
url |
6 | 12 | 13 | ≤12.1 | 5 | 18 | 14 | ≤12.1 | 5 | 1.0 | 3 | 5 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent