2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "domstubs.idl"
|
|
|
|
#include "nsIDOMEvent.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for a client side storage. See
|
2010-01-28 06:53:53 -08:00
|
|
|
* http://dev.w3.org/html5/webstorage/#the-storage-event
|
2007-03-22 10:30:00 -07:00
|
|
|
* for more information.
|
|
|
|
*
|
|
|
|
* Event sent to a window when a storage area changes.
|
|
|
|
*/
|
|
|
|
|
2010-01-28 06:53:53 -08:00
|
|
|
interface nsIDOMStorage;
|
|
|
|
|
2012-08-04 00:44:00 -07:00
|
|
|
[scriptable, builtinclass, uuid(0929c378-2ad6-4fde-a0db-8cd61bbb080c)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIDOMStorageEvent : nsIDOMEvent
|
|
|
|
{
|
|
|
|
/**
|
2010-01-28 06:53:53 -08:00
|
|
|
* Attribute represents the key being changed. The key attribute is null
|
|
|
|
* when change has been invoked by the storage clear() method.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString key;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The original value of the key. The oldValue is null when the change
|
|
|
|
* has been invoked by storage clear() method or the key has been newly
|
|
|
|
* added and therefor doesn't have any previous value.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString oldValue;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The new value of the key. The newValue is null when the change
|
|
|
|
* has been invoked by storage clear() method or the key has been removed
|
|
|
|
* from the storage.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString newValue;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents the address of the document whose key changed.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString url;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents the Storage object that was affected.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2010-01-28 06:53:53 -08:00
|
|
|
readonly attribute nsIDOMStorage storageArea;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2010-01-28 06:53:53 -08:00
|
|
|
* Initialize the event in a manner analogous to the similarly-named method
|
|
|
|
* in the DOM Events interfaces.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
void initStorageEvent(in DOMString typeArg,
|
|
|
|
in boolean canBubbleArg,
|
|
|
|
in boolean cancelableArg,
|
2010-01-28 06:53:53 -08:00
|
|
|
in DOMString keyArg,
|
|
|
|
in DOMString oldValueArg,
|
|
|
|
in DOMString newValueArg,
|
|
|
|
in DOMString urlArg,
|
|
|
|
in nsIDOMStorage storageAreaArg);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
2012-03-08 13:27:05 -08:00
|
|
|
|
2012-03-12 21:44:48 -07:00
|
|
|
dictionary StorageEventInit : EventInit
|
2012-03-08 13:27:05 -08:00
|
|
|
{
|
2012-05-25 00:18:31 -07:00
|
|
|
DOMString? key;
|
2012-03-12 21:44:51 -07:00
|
|
|
DOMString? oldValue;
|
|
|
|
DOMString? newValue;
|
2012-03-12 21:44:48 -07:00
|
|
|
DOMString url;
|
|
|
|
nsIDOMStorage storageArea;
|
2012-03-08 13:27:05 -08:00
|
|
|
};
|