michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: #include "nsIDOMDocument.idl" michael@0: michael@0: interface nsIDOMXULCommandDispatcher; michael@0: interface nsIObserver; michael@0: interface nsIBoxObject; michael@0: michael@0: [scriptable, uuid(efdb94fb-642f-4a79-ae20-9a5f7cb7f736)] michael@0: interface nsIDOMXULDocument : nsIDOMDocument michael@0: { michael@0: attribute nsIDOMNode popupNode; michael@0: michael@0: /** michael@0: * These attributes correspond to trustedGetPopupNode().rangeOffset and michael@0: * rangeParent. They will help you find where in the DOM the popup is michael@0: * happening. Can be accessed from chrome only, and only during a popup michael@0: * event. Accessing any other time will be an error. michael@0: */ michael@0: readonly attribute nsIDOMNode popupRangeParent; michael@0: readonly attribute long popupRangeOffset; michael@0: michael@0: attribute nsIDOMNode tooltipNode; michael@0: michael@0: readonly attribute nsIDOMXULCommandDispatcher commandDispatcher; michael@0: michael@0: readonly attribute long width; michael@0: readonly attribute long height; michael@0: michael@0: nsIDOMNodeList getElementsByAttribute(in DOMString name, michael@0: in DOMString value); michael@0: michael@0: nsIDOMNodeList getElementsByAttributeNS(in DOMString namespaceURI, michael@0: in DOMString name, michael@0: in DOMString value); michael@0: michael@0: void addBroadcastListenerFor(in nsIDOMElement broadcaster, michael@0: in nsIDOMElement observer, michael@0: in DOMString attr); michael@0: michael@0: void removeBroadcastListenerFor(in nsIDOMElement broadcaster, michael@0: in nsIDOMElement observer, michael@0: in DOMString attr); michael@0: michael@0: void persist(in DOMString id, in DOMString attr); michael@0: michael@0: nsIBoxObject getBoxObjectFor(in nsIDOMElement elt); michael@0: michael@0: /** michael@0: * Loads a XUL overlay and merges it with the current document, notifying an michael@0: * observer when the merge is complete. michael@0: * @param url michael@0: * The URL of the overlay to load and merge michael@0: * @param observer michael@0: * An object implementing nsIObserver that will be notified with a michael@0: * message of topic "xul-overlay-merged" when the merge is complete. michael@0: * The subject parameter of |observe| will QI to a nsIURI - the URI michael@0: * of the merged overlay. This parameter is optional and may be null. michael@0: * michael@0: * NOTICE: In the 2.0 timeframe this API will change such that the michael@0: * implementation will fire a DOMXULOverlayMerged event upon merge michael@0: * completion rather than notifying an observer. Do not rely on this michael@0: * API's behavior _not_ to change because it will! michael@0: * - Ben Goodger (8/23/2005) michael@0: */ michael@0: void loadOverlay(in DOMString url, in nsIObserver aObserver); michael@0: };