|
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 file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 */ |
|
6 |
|
7 [OverrideBuiltins] |
|
8 interface HTMLDocument : Document { |
|
9 [Throws] |
|
10 attribute DOMString? domain; |
|
11 [Throws] |
|
12 attribute DOMString cookie; |
|
13 // DOM tree accessors |
|
14 [Throws] |
|
15 getter object (DOMString name); |
|
16 [Pure, SetterThrows] |
|
17 attribute HTMLElement? body; |
|
18 [Pure] |
|
19 readonly attribute HTMLHeadElement? head; |
|
20 [Pure] |
|
21 readonly attribute HTMLCollection images; |
|
22 [Pure] |
|
23 readonly attribute HTMLCollection embeds; |
|
24 [Pure] |
|
25 readonly attribute HTMLCollection plugins; |
|
26 [Pure] |
|
27 readonly attribute HTMLCollection links; |
|
28 [Pure] |
|
29 readonly attribute HTMLCollection forms; |
|
30 [Pure] |
|
31 readonly attribute HTMLCollection scripts; |
|
32 NodeList getElementsByName(DOMString elementName); |
|
33 NodeList getItems(optional DOMString typeNames = ""); // microdata |
|
34 |
|
35 // dynamic markup insertion |
|
36 [Throws] |
|
37 Document open(optional DOMString type = "text/html", optional DOMString replace = ""); |
|
38 [Throws] |
|
39 WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); |
|
40 [Throws] |
|
41 void close(); |
|
42 [Throws] |
|
43 void write(DOMString... text); |
|
44 [Throws] |
|
45 void writeln(DOMString... text); |
|
46 |
|
47 [SetterThrows] |
|
48 attribute DOMString designMode; |
|
49 [Throws] |
|
50 boolean execCommand(DOMString commandId, optional boolean showUI = false, |
|
51 optional DOMString value = ""); |
|
52 [Throws] |
|
53 boolean queryCommandEnabled(DOMString commandId); |
|
54 [Throws] |
|
55 boolean queryCommandIndeterm(DOMString commandId); |
|
56 [Throws] |
|
57 boolean queryCommandState(DOMString commandId); |
|
58 boolean queryCommandSupported(DOMString commandId); |
|
59 [Throws] |
|
60 DOMString queryCommandValue(DOMString commandId); |
|
61 |
|
62 [TreatNullAs=EmptyString] attribute DOMString fgColor; |
|
63 [TreatNullAs=EmptyString] attribute DOMString linkColor; |
|
64 [TreatNullAs=EmptyString] attribute DOMString vlinkColor; |
|
65 [TreatNullAs=EmptyString] attribute DOMString alinkColor; |
|
66 [TreatNullAs=EmptyString] attribute DOMString bgColor; |
|
67 |
|
68 [Pure] |
|
69 readonly attribute HTMLCollection anchors; |
|
70 [Pure] |
|
71 readonly attribute HTMLCollection applets; |
|
72 |
|
73 void clear(); |
|
74 |
|
75 [Throws] |
|
76 readonly attribute object all; |
|
77 |
|
78 // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections |
|
79 [Throws] |
|
80 Selection? getSelection(); |
|
81 |
|
82 // @deprecated These are old Netscape 4 methods. Do not use, |
|
83 // the implementation is no-op. |
|
84 // XXXbz do we actually need these anymore? |
|
85 void captureEvents(); |
|
86 void releaseEvents(); |
|
87 }; |