StorageEvent
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.
Constructor
StorageEvent()
-
Returns a newly constructed
StorageEvent
object.
Properties
In addition to the properties listed below, this interface inherits the properties of its parent interface, Event
.
key
Read only-
Returns a
DOMString
that represents the key changed. Thekey
attribute isnull
when the change is caused by the storageclear()
method. newValue
Read only-
Returns a
DOMString
with the new value of thekey
. This value isnull
when the change has been invoked by storageclear()
method, or thekey
has been removed from the storage. oldValue
Read only-
Returns a
DOMString
with the original value of thekey
. This value isnull
when thekey
has been newly added and therefore doesn't have any previous value. storageArea
Read only-
Returns a
Storage
object that represents the storage that was affected. url
Read only-
Returns
DOMString
with the URL of the document whosekey
changed.
Methods
In addition to the methods listed below, this interface inherits the methods of its parent interface, Event
.
initStorageEvent()
-
Initializes the event in a manner analogous to the similarly-named
initEvent()
} method in the DOM Events interfaces. Use the constructor instead.
Specifications
Specification |
---|
HTML Standard # the-storageevent-interface |
Browser compatibility
BCD tables only load in the browser