StorageEvent oldValue Property
Example
Get the old value of the storage item that changed:
  window.addEventListener("storage", myFunction);
function myFunction(event) 
  {
  var x = "Old Value: " + event.oldValue;
  document.getElementById("demo").innerHTML 
  = x;
}
Try it Yourself »
Definition and Usage
The oldValue property returns the old value of the changed storage item.
Note: The storage event is only triggered when a window other than itself makes the changes.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| oldValue | Yes | Yes | Yes | Yes | Yes | 
Syntax
 event.oldValue
Technical Details
| Return Value: | A String, representing the old value of the storage item | 
|---|
Related Pages
StorageEvent reference: The key Property
StorageEvent reference: The newValue Property
StorageEvent reference: The storageArea Property
StorageEvent reference: The url Property
