dom/base/nsIDOMDOMRequest.idl
author Wes Johnston <wjohnston@mozilla.com>
Wed, 08 Aug 2012 12:35:15 -0700
changeset 107347 c030a8af8abd549cc765a4ac11de7ae47a659e03
parent 107156 621cb0844bf504b93fc90dcd21826f29b9b5cb37
child 107372 f4495eb1c973cbb380a74c2611145dd34ff9d5cd
permissions -rw-r--r--
Bug 780718 - Return false from DOMRequestService is preventDefault was called on events. r=sicking

/* -*- 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"

interface nsIDOMDOMError;
interface nsIDOMWindow;

[scriptable, builtinclass, uuid(a3ad2846-ffb2-48d7-a786-2254cb82560d)]
interface nsIDOMDOMRequest : nsIDOMEventTarget
{
  readonly attribute DOMString readyState; // "pending" or "done"

  readonly attribute jsval result;
  readonly attribute nsIDOMDOMError error;

  attribute nsIDOMEventListener onsuccess;
  attribute nsIDOMEventListener onerror;
};

[scriptable, builtinclass, uuid(46afe27a-d407-4eb8-95c4-aefbd2b63540)]
interface nsIDOMRequestService : nsISupports
{
  nsIDOMDOMRequest createRequest(in nsIDOMWindow window);

  bool fireSuccess(in nsIDOMDOMRequest request, in jsval result);
  bool fireError(in nsIDOMDOMRequest request, in DOMString error);
};