StorageEvent: initStorageEvent() method
Deprecated
Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.>
The StorageEvent.initStorageEvent() method is used to initialize the value of a StorageEvent.
Syntax
js
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.
canBubbleOptional-
A boolean indicating whether the event bubbles up through the DOM or not.
cancelableOptional-
A boolean indicating whether the event is cancelable.
keyOptional-
The key whose value is changing as a result of this event.
oldValueOptional-
The key's old value.
newValueOptional-
The key's new value.
urlOptional-
The URL of the document initiating the change.
storageAreaOptional-
The
Storageobject representing the storage area on which this event occurred.
Return value
None (undefined).
Specifications
| Specification |
|---|
| HTML> # dom-storageevent-initstorageevent> |
Browser compatibility
See also
- Web Storage API
- The constructor to use instead of this deprecated method:
StorageEvent().