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]
8interface 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
17  // dynamic markup insertion
18  [CEReactions, Throws]
19  Document open(optional DOMString type, optional DOMString replace = ""); // type is ignored
20  [CEReactions, Throws]
21  WindowProxy? open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
22  [CEReactions, Throws]
23  void close();
24  [CEReactions, Throws]
25  void write(DOMString... text);
26  [CEReactions, Throws]
27  void writeln(DOMString... text);
28
29  [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
30           attribute DOMString designMode;
31  [CEReactions, Throws, NeedsSubjectPrincipal]
32  boolean execCommand(DOMString commandId, optional boolean showUI = false,
33                      optional DOMString value = "");
34  [Throws, NeedsSubjectPrincipal]
35  boolean queryCommandEnabled(DOMString commandId);
36  [Throws]
37  boolean queryCommandIndeterm(DOMString commandId);
38  [Throws]
39  boolean queryCommandState(DOMString commandId);
40  [NeedsCallerType]
41  boolean queryCommandSupported(DOMString commandId);
42  [Throws]
43  DOMString queryCommandValue(DOMString commandId);
44
45  [CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor;
46  [CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor;
47  [CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor;
48  [CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor;
49  [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
50
51  void clear();
52
53  readonly attribute HTMLAllCollection all;
54
55  // @deprecated These are old Netscape 4 methods. Do not use,
56  //             the implementation is no-op.
57  // XXXbz do we actually need these anymore?
58  void                      captureEvents();
59  void                      releaseEvents();
60};
61
62partial interface HTMLDocument {
63  /*
64   * Number of nodes that have been blocked by
65   * the Safebrowsing API to prevent tracking.
66   */
67  [ChromeOnly, Pure]
68  readonly attribute long blockedTrackingNodeCount;
69
70  /*
71   * List of nodes that have been blocked by
72   * the Safebrowsing API to prevent tracking.
73   */
74  [ChromeOnly, Pure]
75  readonly attribute NodeList blockedTrackingNodes;
76};
77