Skip to main content

storage_event_ctor

Function storage_event_ctor 

Source
pub(crate) fn storage_event_ctor(
    it: &mut Interp,
    t: Value,
    a: &[Value],
) -> Result<Value, Value>
Expand description

new StorageEvent(type, options)(丸ごと未対応だった。window. dispatchEvent(new StorageEvent('storage', {key, newValue, oldValue})) というクロスタブ同期シミュレーションの定番パターン。この処理系には 実際の複数タブ間 localStorage 同期機構は無いため、コンストラクタ経由の 手動発火のみをサポートする簡略実装)。基底の Event プロパティは event_ctor を再利用し、key/oldValue/newValue/url/storageArea を追加する。