2012-02-24 17:19:49 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#include "nsIDOMEventTarget.idl"
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
interface mozIDOMWindow;
|
2013-02-09 00:25:37 +04:00
|
|
|
interface nsIDOMDOMCursor;
|
|
|
|
interface nsICursorContinueCallback;
|
2012-02-24 17:19:49 +04:00
|
|
|
|
2014-08-14 02:38:29 +04:00
|
|
|
[builtinclass, uuid(e39da69e-2232-4e49-9856-b8a4a6210336)]
|
2012-02-24 17:19:49 +04:00
|
|
|
interface nsIDOMDOMRequest : nsIDOMEventTarget
|
|
|
|
{
|
|
|
|
readonly attribute DOMString readyState; // "pending" or "done"
|
|
|
|
|
|
|
|
readonly attribute jsval result;
|
2013-05-18 21:52:06 +04:00
|
|
|
|
|
|
|
// DOMError
|
|
|
|
readonly attribute nsISupports error;
|
2012-02-24 17:19:49 +04:00
|
|
|
|
2012-08-31 07:45:16 +04:00
|
|
|
[implicit_jscontext] attribute jsval onsuccess;
|
|
|
|
[implicit_jscontext] attribute jsval onerror;
|
2012-02-24 17:19:49 +04:00
|
|
|
};
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
[scriptable, builtinclass, uuid(9a57e5de-ce93-45fa-8145-755722834f7c)]
|
2012-02-24 17:19:49 +04:00
|
|
|
interface nsIDOMRequestService : nsISupports
|
|
|
|
{
|
2016-01-30 20:05:36 +03:00
|
|
|
nsIDOMDOMRequest createRequest(in mozIDOMWindow window);
|
2013-02-09 00:25:37 +04:00
|
|
|
/*
|
|
|
|
* @param aCallback
|
|
|
|
* Called when `continue()' is called in the cursor, should be used to
|
|
|
|
* notify the data provider that content wants the next result.
|
|
|
|
*/
|
2016-01-30 20:05:36 +03:00
|
|
|
nsIDOMDOMCursor createCursor(in mozIDOMWindow window,
|
2013-02-09 00:25:37 +04:00
|
|
|
in nsICursorContinueCallback aCallback);
|
2012-02-24 17:19:49 +04:00
|
|
|
|
2012-08-09 01:07:39 +04:00
|
|
|
void fireSuccess(in nsIDOMDOMRequest request, in jsval result);
|
|
|
|
void fireError(in nsIDOMDOMRequest request, in DOMString error);
|
2013-06-28 06:53:44 +04:00
|
|
|
void fireDetailedError(in nsIDOMDOMRequest request, in nsISupports error);
|
2012-09-05 00:19:22 +04:00
|
|
|
void fireSuccessAsync(in nsIDOMDOMRequest request, in jsval result);
|
|
|
|
void fireErrorAsync(in nsIDOMDOMRequest request, in DOMString error);
|
2013-02-09 00:25:37 +04:00
|
|
|
void fireDone(in nsIDOMDOMCursor cursor);
|
2012-02-24 17:19:49 +04:00
|
|
|
};
|