1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,100 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIDOMDocument.idl" 1.10 + 1.11 +/** 1.12 + * The nsIDOMHTMLDocument interface is the interface to a [X]HTML 1.13 + * document object. 1.14 + * 1.15 + * @see <http://www.whatwg.org/html/> 1.16 + */ 1.17 +interface nsISelection; 1.18 + 1.19 +[scriptable, uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)] 1.20 +interface nsIDOMHTMLDocument : nsIDOMDocument 1.21 +{ 1.22 + attribute DOMString domain; 1.23 + attribute DOMString cookie; 1.24 + 1.25 + readonly attribute nsIDOMHTMLHeadElement head; 1.26 + attribute nsIDOMHTMLElement body; 1.27 + 1.28 + readonly attribute nsIDOMHTMLCollection images; 1.29 + readonly attribute nsIDOMHTMLCollection embeds; 1.30 + // mapped to attribute embeds for NS4 compat 1.31 + readonly attribute nsIDOMHTMLCollection plugins; 1.32 + readonly attribute nsIDOMHTMLCollection links; 1.33 + readonly attribute nsIDOMHTMLCollection forms; 1.34 + readonly attribute nsIDOMHTMLCollection scripts; 1.35 + nsIDOMNodeList getElementsByName(in DOMString elementName); 1.36 + nsIDOMNodeList getItems([optional] in DOMString types); 1.37 + 1.38 + // If aContentType is not something supported by nsHTMLDocument and 1.39 + // the HTML content sink, trying to write to the document will 1.40 + // probably throw. 1.41 + // Pass aReplace = true to trigger a replacement of the previous 1.42 + // document in session history; pass false for normal history handling. 1.43 + [implicit_jscontext, optional_argc] 1.44 + nsISupports open([optional] in DOMString aContentTypeOrUrl, 1.45 + [optional] in DOMString aReplaceOrName, 1.46 + [optional] in DOMString aFeatures); 1.47 + void close(); 1.48 + 1.49 + [implicit_jscontext] 1.50 + void write([optional, Null(Stringify)] in DOMString text); 1.51 + [implicit_jscontext] 1.52 + void writeln([optional, Null(Stringify)] in DOMString text); 1.53 + 1.54 + /** 1.55 + * Midas additions 1.56 + */ 1.57 + attribute DOMString designMode; 1.58 + 1.59 + boolean execCommand(in DOMString commandID, 1.60 + [optional] in boolean doShowUI, 1.61 + [optional] in DOMString value); 1.62 + 1.63 + // returns true if the command is enabled (false otherwise) 1.64 + boolean queryCommandEnabled(in DOMString commandID); 1.65 + 1.66 + // returns true if the command is in a indeterminate state (false otherwise) 1.67 + boolean queryCommandIndeterm(in DOMString commandID); 1.68 + 1.69 + // returns true if the command has been executed (false otherwise) 1.70 + boolean queryCommandState(in DOMString commandID); 1.71 + 1.72 + // returns true if the command is supported on the current range 1.73 + boolean queryCommandSupported(in DOMString commandID); 1.74 + 1.75 + // returns the current value of the document or current selection for command 1.76 + DOMString queryCommandValue(in DOMString commandID); 1.77 + 1.78 + 1.79 + // Obsolete APIs 1.80 + attribute DOMString fgColor; 1.81 + attribute DOMString bgColor; 1.82 + attribute DOMString linkColor; 1.83 + attribute DOMString vlinkColor; 1.84 + attribute DOMString alinkColor; 1.85 + 1.86 + readonly attribute nsIDOMHTMLCollection anchors; 1.87 + readonly attribute nsIDOMHTMLCollection applets; 1.88 + 1.89 + void clear(); 1.90 + 1.91 + 1.92 + // DOM Range 1.93 + nsISelection getSelection(); 1.94 + 1.95 + 1.96 + // More obsolete APIs 1.97 + /** 1.98 + * @deprecated These are old Netscape 4 methods. Do not use, 1.99 + * the implementation is no-op. 1.100 + */ 1.101 + void captureEvents(); 1.102 + void releaseEvents(); 1.103 +};