dom/interfaces/storage/nsIDOMStorageEvent.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/interfaces/storage/nsIDOMStorageEvent.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "domstubs.idl"
    1.10 +#include "nsIDOMEvent.idl"
    1.11 +
    1.12 +/**
    1.13 + * Interface for a client side storage. See
    1.14 + * http://dev.w3.org/html5/webstorage/#the-storage-event
    1.15 + * for more information.
    1.16 + *
    1.17 + * Event sent to a window when a storage area changes.
    1.18 + */
    1.19 +
    1.20 +interface nsIDOMStorage;
    1.21 +
    1.22 +[scriptable, builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)]
    1.23 +interface nsIDOMStorageEvent : nsIDOMEvent
    1.24 +{
    1.25 +  /**
    1.26 +   * Attribute represents the key being changed. The key attribute is null
    1.27 +   * when change has been invoked by the storage clear() method.
    1.28 +   */
    1.29 +  readonly attribute DOMString key;
    1.30 +
    1.31 +  /**
    1.32 +   * The original value of the key. The oldValue is null when the change
    1.33 +   * has been invoked by storage clear() method or the key has been newly
    1.34 +   * added and therefor doesn't have any previous value.
    1.35 +   */
    1.36 +  readonly attribute DOMString oldValue;
    1.37 +
    1.38 +  /**
    1.39 +   * The new value of the key. The newValue is null when the change
    1.40 +   * has been invoked by storage clear() method or the key has been removed
    1.41 +   * from the storage.
    1.42 +   */
    1.43 +  readonly attribute DOMString newValue;
    1.44 +
    1.45 +  /**
    1.46 +   * Represents the address of the document whose key changed.
    1.47 +   */
    1.48 +  readonly attribute DOMString url;
    1.49 +
    1.50 +  /**
    1.51 +   * Represents the Storage object that was affected.
    1.52 +   */
    1.53 +  readonly attribute nsIDOMStorage storageArea;
    1.54 +
    1.55 +  /**
    1.56 +   * Initialize the event in a manner analogous to the similarly-named method
    1.57 +   * in the DOM Events interfaces.
    1.58 +   */
    1.59 +  void initStorageEvent(in DOMString typeArg, 
    1.60 +                        in boolean canBubbleArg, 
    1.61 +                        in boolean cancelableArg, 
    1.62 +                        in DOMString keyArg,
    1.63 +                        in DOMString oldValueArg,
    1.64 +                        in DOMString newValueArg,
    1.65 +                        in DOMString urlArg,
    1.66 +                        in nsIDOMStorage storageAreaArg);
    1.67 +};

mercurial