michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: #include "nsIDOMEvent.idl" michael@0: michael@0: /** michael@0: * Interface for a client side storage. See michael@0: * http://dev.w3.org/html5/webstorage/#the-storage-event michael@0: * for more information. michael@0: * michael@0: * Event sent to a window when a storage area changes. michael@0: */ michael@0: michael@0: interface nsIDOMStorage; michael@0: michael@0: [scriptable, builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)] michael@0: interface nsIDOMStorageEvent : nsIDOMEvent michael@0: { michael@0: /** michael@0: * Attribute represents the key being changed. The key attribute is null michael@0: * when change has been invoked by the storage clear() method. michael@0: */ michael@0: readonly attribute DOMString key; michael@0: michael@0: /** michael@0: * The original value of the key. The oldValue is null when the change michael@0: * has been invoked by storage clear() method or the key has been newly michael@0: * added and therefor doesn't have any previous value. michael@0: */ michael@0: readonly attribute DOMString oldValue; michael@0: michael@0: /** michael@0: * The new value of the key. The newValue is null when the change michael@0: * has been invoked by storage clear() method or the key has been removed michael@0: * from the storage. michael@0: */ michael@0: readonly attribute DOMString newValue; michael@0: michael@0: /** michael@0: * Represents the address of the document whose key changed. michael@0: */ michael@0: readonly attribute DOMString url; michael@0: michael@0: /** michael@0: * Represents the Storage object that was affected. michael@0: */ michael@0: readonly attribute nsIDOMStorage storageArea; michael@0: michael@0: /** michael@0: * Initialize the event in a manner analogous to the similarly-named method michael@0: * in the DOM Events interfaces. michael@0: */ michael@0: void initStorageEvent(in DOMString typeArg, michael@0: in boolean canBubbleArg, michael@0: in boolean cancelableArg, michael@0: in DOMString keyArg, michael@0: in DOMString oldValueArg, michael@0: in DOMString newValueArg, michael@0: in DOMString urlArg, michael@0: in nsIDOMStorage storageAreaArg); michael@0: };