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/.
8 interface HTMLDocument : Document {
10 attribute DOMString? domain;
12 attribute DOMString cookie;
15 getter object (DOMString name);
17 attribute HTMLElement? body;
19 readonly attribute HTMLHeadElement? head;
21 readonly attribute HTMLCollection images;
23 readonly attribute HTMLCollection embeds;
25 readonly attribute HTMLCollection plugins;
27 readonly attribute HTMLCollection links;
29 readonly attribute HTMLCollection forms;
31 readonly attribute HTMLCollection scripts;
32 NodeList getElementsByName(DOMString elementName);
33 NodeList getItems(optional DOMString typeNames = ""); // microdata
35 // dynamic markup insertion
37 Document open(optional DOMString type = "text/html", optional DOMString replace = "");
39 WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
43 void write(DOMString... text);
45 void writeln(DOMString... text);
48 attribute DOMString designMode;
50 boolean execCommand(DOMString commandId, optional boolean showUI = false,
51 optional DOMString value = "");
53 boolean queryCommandEnabled(DOMString commandId);
55 boolean queryCommandIndeterm(DOMString commandId);
57 boolean queryCommandState(DOMString commandId);
58 boolean queryCommandSupported(DOMString commandId);
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;
69 readonly attribute HTMLCollection anchors;
71 readonly attribute HTMLCollection applets;
75 readonly attribute HTMLAllCollection all;
77 // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections
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?
88 partial interface HTMLDocument {
90 * Number of nodes that have been blocked by
91 * the Safebrowsing API to prevent tracking.
94 readonly attribute long blockedTrackingNodeCount;
97 * List of nodes that have been blocked by
98 * the Safebrowsing API to prevent tracking.
101 readonly attribute NodeList blockedTrackingNodes;