Bug 1787199 [wpt PR 35620] - Add tests for `VisibilityStateEntry`, a=testonly
[gecko.git] / dom / webidl / StorageEvent.webidl
blobb41d144603013a4d0739a931b0c0d27bb2b10132
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * Interface for a client side storage. See
7  * http://dev.w3.org/html5/webstorage/#the-storage-event
8  * for more information.
9  *
10  * Event sent to a window when a storage area changes.
11  */
13 [Exposed=Window]
14 interface StorageEvent : Event
16   constructor(DOMString type, optional StorageEventInit eventInitDict = {});
18   readonly attribute DOMString? key;
19   readonly attribute DOMString? oldValue;
20   readonly attribute DOMString? newValue;
21   readonly attribute DOMString? url;
22   readonly attribute Storage? storageArea;
24   // Bug 1016053 - This is not spec compliant.
25   undefined initStorageEvent(DOMString type,
26                              optional boolean canBubble = false,
27                              optional boolean cancelable = false,
28                              optional DOMString? key = null,
29                              optional DOMString? oldValue = null,
30                              optional DOMString? newValue = null,
31                              optional DOMString? url = null,
32                              optional Storage? storageArea = null);
35 dictionary StorageEventInit : EventInit
37   DOMString? key = null;
38   DOMString? oldValue = null;
39   DOMString? newValue = null;
40   DOMString url = "";
41   Storage? storageArea = null;