StorageEvent storageArea Property

❮ DOM Events ❮ StorageEvent

Example

Get the Storage Object of the storage item that changed:

window.addEventListener("storage", myFunction);

function myFunction(event) {
  var x = event.storageArea;
  document.getElementById("demo").innerHTML = x;
}
Try it Yourself »

Description

The storageArea property returns the Storage Object of the changed storage item.

Note: The storage event is only triggered when a window other than itself makes the changes.


Browser Support

Property
storageArea Yes Yes Yes Yes Yes

Syntax

event.storageArea

Technical Details

Return Value: An Object, representing the Storage Object of the storage item

Related Pages

StorageEvent reference: The key Property

StorageEvent reference: The newValue Property

StorageEvent reference: The oldValue Property

StorageEvent reference: The url Property


❮ DOM Events ❮ StorageEvent

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.