StorageEvent url Property

❮ DOM Events ❮ StorageEvent

Example

Get the URL of page where the storage item was changed:

window.addEventListener("storage", myFunction);

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

Description

The url property returns the url of the page where the storage item was changed.

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


Browser Support

Property
url Yes Yes Yes Yes Yes

Syntax

event.url

Technical Details

Return Value: A String, representing the url of the page where the storage item was changed

Related Pages

StorageEvent reference: The key Property

StorageEvent reference: The newValue Property

StorageEvent reference: The oldValue Property

StorageEvent reference: The storageArea Property


❮ DOM Events ❮ StorageEvent

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