StorageEvent: initStorageEvent() Methode
Deprecated
Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.>
Die StorageEvent.initStorageEvent() Methode wird verwendet, um den Wert eines StorageEvent zu initialisieren.
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)
Parameter
typeArg-
Der Name des Ereignisses.
canBubbleOptional-
Ein boolean, der angibt, ob das Ereignis innerhalb des DOM nach oben steigen kann oder nicht.
cancelableOptional-
Ein boolean, der angibt, ob das Ereignis abgebrochen werden kann.
keyOptional-
Der Schlüssel, dessen Wert sich infolge dieses Ereignisses ändert.
oldValueOptional-
Der alte Wert des Schlüssels.
newValueOptional-
Der neue Wert des Schlüssels.
urlOptional-
Die URL des Dokuments, das die Änderung initiiert.
storageAreaOptional-
Das
Storage-Objekt, das den Speicherbereich repräsentiert, in dem dieses Ereignis aufgetreten ist.
Rückgabewert
Keiner (undefined).
Spezifikationen
| Spezifikation |
|---|
| HTML> # dom-storageevent-initstorageevent> |
Browser-Kompatibilität
Siehe auch
- Web Storage API
- Der Konstruktor, der anstelle dieser veralteten Methode verwendet werden sollte:
StorageEvent().