Bumping manifests a=b2g-bump
[gecko.git] / dom / webidl / HTMLDocument.webidl
blob8947a3e77ede32300c8effec2af7e02a7225bc28
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  */
7 [OverrideBuiltins]
8 interface HTMLDocument : Document {
9            [SetterThrows]
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
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);
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);
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;
68   [Pure]
69   readonly attribute HTMLCollection anchors;
70   [Pure]
71   readonly attribute HTMLCollection applets;
73   void clear();
75   readonly attribute HTMLAllCollection all;
77   // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections
78   [Throws]
79   Selection? getSelection();
81   // @deprecated These are old Netscape 4 methods. Do not use,
82   //             the implementation is no-op.
83   // XXXbz do we actually need these anymore?
84   void                      captureEvents();
85   void                      releaseEvents();
88 partial interface HTMLDocument {
89   /*
90    * Number of nodes that have been blocked by
91    * the Safebrowsing API to prevent tracking.
92    */
93   [ChromeOnly, Pure]
94   readonly attribute long blockedTrackingNodeCount;
96   /*
97    * List of nodes that have been blocked by
98    * the Safebrowsing API to prevent tracking.
99    */
100   [ChromeOnly, Pure]
101   readonly attribute NodeList blockedTrackingNodes;