dom/base/nsIDOMDOMRequest.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     5  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsIDOMEventTarget.idl"
     9 interface nsIDOMWindow;
    10 interface nsIDOMDOMCursor;
    11 interface nsICursorContinueCallback;
    13 [scriptable, builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)]
    14 interface nsIDOMDOMRequest : nsIDOMEventTarget
    15 {
    16   readonly attribute DOMString readyState; // "pending" or "done"
    18   readonly attribute jsval result;
    20   // DOMError
    21   readonly attribute nsISupports error;
    23   [implicit_jscontext] attribute jsval onsuccess;
    24   [implicit_jscontext] attribute jsval onerror;
    25 };
    27 [scriptable, builtinclass, uuid(df58d5d6-4b02-4e4c-9b29-adbff06c6206)]
    28 interface nsIDOMRequestService : nsISupports
    29 {
    30   nsIDOMDOMRequest createRequest(in nsIDOMWindow window);
    31   /*
    32    * @param aCallback
    33    *        Called when `continue()' is called in the cursor, should be used to
    34    *        notify the data provider that content wants the next result.
    35    */
    36   nsIDOMDOMCursor createCursor(in nsIDOMWindow window,
    37                                in nsICursorContinueCallback aCallback);
    39   void fireSuccess(in nsIDOMDOMRequest request, in jsval result);
    40   void fireError(in nsIDOMDOMRequest request, in DOMString error);
    41   void fireDetailedError(in nsIDOMDOMRequest request, in nsISupports error);
    42   void fireSuccessAsync(in nsIDOMDOMRequest request, in jsval result);
    43   void fireErrorAsync(in nsIDOMDOMRequest request, in DOMString error);
    44   void fireDone(in nsIDOMDOMCursor cursor);
    45 };

mercurial