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 "nsIDOMDocument.idl" michael@0: michael@0: /** michael@0: * The nsIDOMHTMLDocument interface is the interface to a [X]HTML michael@0: * document object. michael@0: * michael@0: * @see michael@0: */ michael@0: interface nsISelection; michael@0: michael@0: [scriptable, uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)] michael@0: interface nsIDOMHTMLDocument : nsIDOMDocument michael@0: { michael@0: attribute DOMString domain; michael@0: attribute DOMString cookie; michael@0: michael@0: readonly attribute nsIDOMHTMLHeadElement head; michael@0: attribute nsIDOMHTMLElement body; michael@0: michael@0: readonly attribute nsIDOMHTMLCollection images; michael@0: readonly attribute nsIDOMHTMLCollection embeds; michael@0: // mapped to attribute embeds for NS4 compat michael@0: readonly attribute nsIDOMHTMLCollection plugins; michael@0: readonly attribute nsIDOMHTMLCollection links; michael@0: readonly attribute nsIDOMHTMLCollection forms; michael@0: readonly attribute nsIDOMHTMLCollection scripts; michael@0: nsIDOMNodeList getElementsByName(in DOMString elementName); michael@0: nsIDOMNodeList getItems([optional] in DOMString types); michael@0: michael@0: // If aContentType is not something supported by nsHTMLDocument and michael@0: // the HTML content sink, trying to write to the document will michael@0: // probably throw. michael@0: // Pass aReplace = true to trigger a replacement of the previous michael@0: // document in session history; pass false for normal history handling. michael@0: [implicit_jscontext, optional_argc] michael@0: nsISupports open([optional] in DOMString aContentTypeOrUrl, michael@0: [optional] in DOMString aReplaceOrName, michael@0: [optional] in DOMString aFeatures); michael@0: void close(); michael@0: michael@0: [implicit_jscontext] michael@0: void write([optional, Null(Stringify)] in DOMString text); michael@0: [implicit_jscontext] michael@0: void writeln([optional, Null(Stringify)] in DOMString text); michael@0: michael@0: /** michael@0: * Midas additions michael@0: */ michael@0: attribute DOMString designMode; michael@0: michael@0: boolean execCommand(in DOMString commandID, michael@0: [optional] in boolean doShowUI, michael@0: [optional] in DOMString value); michael@0: michael@0: // returns true if the command is enabled (false otherwise) michael@0: boolean queryCommandEnabled(in DOMString commandID); michael@0: michael@0: // returns true if the command is in a indeterminate state (false otherwise) michael@0: boolean queryCommandIndeterm(in DOMString commandID); michael@0: michael@0: // returns true if the command has been executed (false otherwise) michael@0: boolean queryCommandState(in DOMString commandID); michael@0: michael@0: // returns true if the command is supported on the current range michael@0: boolean queryCommandSupported(in DOMString commandID); michael@0: michael@0: // returns the current value of the document or current selection for command michael@0: DOMString queryCommandValue(in DOMString commandID); michael@0: michael@0: michael@0: // Obsolete APIs michael@0: attribute DOMString fgColor; michael@0: attribute DOMString bgColor; michael@0: attribute DOMString linkColor; michael@0: attribute DOMString vlinkColor; michael@0: attribute DOMString alinkColor; michael@0: michael@0: readonly attribute nsIDOMHTMLCollection anchors; michael@0: readonly attribute nsIDOMHTMLCollection applets; michael@0: michael@0: void clear(); michael@0: michael@0: michael@0: // DOM Range michael@0: nsISelection getSelection(); michael@0: michael@0: michael@0: // More obsolete APIs michael@0: /** michael@0: * @deprecated These are old Netscape 4 methods. Do not use, michael@0: * the implementation is no-op. michael@0: */ michael@0: void captureEvents(); michael@0: void releaseEvents(); michael@0: };