dom/interfaces/storage/nsIDOMStorageEvent.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:c76c97287106
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
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #include "domstubs.idl"
7 #include "nsIDOMEvent.idl"
8
9 /**
10 * Interface for a client side storage. See
11 * http://dev.w3.org/html5/webstorage/#the-storage-event
12 * for more information.
13 *
14 * Event sent to a window when a storage area changes.
15 */
16
17 interface nsIDOMStorage;
18
19 [scriptable, builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)]
20 interface nsIDOMStorageEvent : nsIDOMEvent
21 {
22 /**
23 * Attribute represents the key being changed. The key attribute is null
24 * when change has been invoked by the storage clear() method.
25 */
26 readonly attribute DOMString key;
27
28 /**
29 * The original value of the key. The oldValue is null when the change
30 * has been invoked by storage clear() method or the key has been newly
31 * added and therefor doesn't have any previous value.
32 */
33 readonly attribute DOMString oldValue;
34
35 /**
36 * The new value of the key. The newValue is null when the change
37 * has been invoked by storage clear() method or the key has been removed
38 * from the storage.
39 */
40 readonly attribute DOMString newValue;
41
42 /**
43 * Represents the address of the document whose key changed.
44 */
45 readonly attribute DOMString url;
46
47 /**
48 * Represents the Storage object that was affected.
49 */
50 readonly attribute nsIDOMStorage storageArea;
51
52 /**
53 * Initialize the event in a manner analogous to the similarly-named method
54 * in the DOM Events interfaces.
55 */
56 void initStorageEvent(in DOMString typeArg,
57 in boolean canBubbleArg,
58 in boolean cancelableArg,
59 in DOMString keyArg,
60 in DOMString oldValueArg,
61 in DOMString newValueArg,
62 in DOMString urlArg,
63 in nsIDOMStorage storageAreaArg);
64 };

mercurial