MDN self-hosted library · e01.org

StorageEvent: initStorageEvent() method

Web Storage API

no runnable cells web-api-instance-method upstream source

Web Storage API

The StorageEvent.initStorageEvent() method is used to initialize the value of a StorageEvent.

Syntax

initStorageEvent(type)
initStorageEvent(type, canBubble)
initStorageEvent(type, canBubble, cancelable)
initStorageEvent(type, canBubble, cancelable, key)
initStorageEvent(type, canBubble, cancelable, key, oldValue)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue, url)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue, url, storageArea)

Parameters

  • typeArg
  • : The name of the event.
  • canBubble
  • : A boolean indicating whether the event bubbles up through the DOM or not.
  • cancelable
  • : A boolean indicating whether the event is cancelable.
  • key
  • : The key whose value is changing as a result of this event.
  • oldValue
  • : The key's old value.
  • newValue
  • : The key's new value.
  • url
  • : The URL of the document initiating the change.
  • storageArea
  • : The Storage object representing the storage area on which this event occurred.

Return value

None (undefined).

Specifications

Browser compatibility

See also

  • The constructor to use instead of this deprecated method: StorageEvent().