Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

StorageEvent

BaselineWidely available

TheStorageEvent interface is implemented by thestorage event, which issent to a windowwhen a storage area the window has access to is changed within the context of another document.

Event StorageEvent

Constructor

StorageEvent()

Returns a newly constructedStorageEvent object.

Instance properties

In addition to the properties listed below, this interface inherits the properties of its parent interface,Event.

keyRead only

Returns a string with the key for the storage item that was changed.Thekey attribute isnull when the change is caused by the storageclear() method.

newValueRead only

Returns a string with the new value of the storage item that was changed.This value isnull when the change has been invoked by storageclear() method,or the storage item has been removed from the storage.

oldValueRead only

Returns a string with the original value of the storage item that was changed.This value isnull when the storage item has been newly addedand therefore doesn't have any previous value.

storageAreaRead only

Returns aStorage object that represents the storage object that was affected.

urlRead only

Returns string with the URL of the document whose storage changed.

Instance methods

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-namedinitEvent() method in the DOM Events interfaces. Use the constructor instead.

Specifications

Specification
HTML
# the-storageevent-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp