このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

StorageEvent: initStorageEvent() メソッド

Deprecated

Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.

StorageEvent.initStorageEvent() メソッドは StorageEvent の値を初期化するために使用します。

構文

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)

引数

typeArg

イベントの名前です。

canBubble 省略可

論理値で、イベントが DOM を介してバブリングするかどうかを示します。

cancelable 省略可

論理値で、イベントがキャンセル可能であるかどうかを示します。

key 省略可

このイベントの結果として値を変更しようとしているキーです。

oldValue 省略可

キーの古い値です。

newValue 省略可

キーの新しい値です。

url 省略可

変更を行おうとしている文書の URL です。

storageArea 省略可

このイベントが発生したストレージ領域を表す Storage オブジェクトです。

返値

なし (undefined)。

仕様書

仕様書
HTML
# dom-storageevent-initstorageevent

ブラウザーの互換性

関連情報

  • この非推奨のメソッドの代わりに使用するコンストラクター: StorageEvent()