Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsIDOMDocument.idl"
8 /**
9 * The nsIDOMHTMLDocument interface is the interface to a [X]HTML
10 * document object.
11 *
12 * @see <http://www.whatwg.org/html/>
13 */
14 interface nsISelection;
16 [scriptable, uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)]
17 interface nsIDOMHTMLDocument : nsIDOMDocument
18 {
19 attribute DOMString domain;
20 attribute DOMString cookie;
22 readonly attribute nsIDOMHTMLHeadElement head;
23 attribute nsIDOMHTMLElement body;
25 readonly attribute nsIDOMHTMLCollection images;
26 readonly attribute nsIDOMHTMLCollection embeds;
27 // mapped to attribute embeds for NS4 compat
28 readonly attribute nsIDOMHTMLCollection plugins;
29 readonly attribute nsIDOMHTMLCollection links;
30 readonly attribute nsIDOMHTMLCollection forms;
31 readonly attribute nsIDOMHTMLCollection scripts;
32 nsIDOMNodeList getElementsByName(in DOMString elementName);
33 nsIDOMNodeList getItems([optional] in DOMString types);
35 // If aContentType is not something supported by nsHTMLDocument and
36 // the HTML content sink, trying to write to the document will
37 // probably throw.
38 // Pass aReplace = true to trigger a replacement of the previous
39 // document in session history; pass false for normal history handling.
40 [implicit_jscontext, optional_argc]
41 nsISupports open([optional] in DOMString aContentTypeOrUrl,
42 [optional] in DOMString aReplaceOrName,
43 [optional] in DOMString aFeatures);
44 void close();
46 [implicit_jscontext]
47 void write([optional, Null(Stringify)] in DOMString text);
48 [implicit_jscontext]
49 void writeln([optional, Null(Stringify)] in DOMString text);
51 /**
52 * Midas additions
53 */
54 attribute DOMString designMode;
56 boolean execCommand(in DOMString commandID,
57 [optional] in boolean doShowUI,
58 [optional] in DOMString value);
60 // returns true if the command is enabled (false otherwise)
61 boolean queryCommandEnabled(in DOMString commandID);
63 // returns true if the command is in a indeterminate state (false otherwise)
64 boolean queryCommandIndeterm(in DOMString commandID);
66 // returns true if the command has been executed (false otherwise)
67 boolean queryCommandState(in DOMString commandID);
69 // returns true if the command is supported on the current range
70 boolean queryCommandSupported(in DOMString commandID);
72 // returns the current value of the document or current selection for command
73 DOMString queryCommandValue(in DOMString commandID);
76 // Obsolete APIs
77 attribute DOMString fgColor;
78 attribute DOMString bgColor;
79 attribute DOMString linkColor;
80 attribute DOMString vlinkColor;
81 attribute DOMString alinkColor;
83 readonly attribute nsIDOMHTMLCollection anchors;
84 readonly attribute nsIDOMHTMLCollection applets;
86 void clear();
89 // DOM Range
90 nsISelection getSelection();
93 // More obsolete APIs
94 /**
95 * @deprecated These are old Netscape 4 methods. Do not use,
96 * the implementation is no-op.
97 */
98 void captureEvents();
99 void releaseEvents();
100 };