dom/webidl/HTMLDocument.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/HTMLDocument.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + */
     1.9 +
    1.10 +[OverrideBuiltins]
    1.11 +interface HTMLDocument : Document {
    1.12 +           [Throws]
    1.13 +           attribute DOMString? domain;
    1.14 +           [Throws]
    1.15 +           attribute DOMString cookie;
    1.16 +  // DOM tree accessors
    1.17 +  [Throws]
    1.18 +  getter object (DOMString name);
    1.19 +  [Pure, SetterThrows]
    1.20 +           attribute HTMLElement? body;
    1.21 +  [Pure]
    1.22 +  readonly attribute HTMLHeadElement? head;
    1.23 +  [Pure]
    1.24 +  readonly attribute HTMLCollection images;
    1.25 +  [Pure]
    1.26 +  readonly attribute HTMLCollection embeds;
    1.27 +  [Pure]
    1.28 +  readonly attribute HTMLCollection plugins;
    1.29 +  [Pure]
    1.30 +  readonly attribute HTMLCollection links;
    1.31 +  [Pure]
    1.32 +  readonly attribute HTMLCollection forms;
    1.33 +  [Pure]
    1.34 +  readonly attribute HTMLCollection scripts;
    1.35 +  NodeList getElementsByName(DOMString elementName);
    1.36 +  NodeList getItems(optional DOMString typeNames = ""); // microdata
    1.37 +
    1.38 +  // dynamic markup insertion
    1.39 +  [Throws]
    1.40 +  Document open(optional DOMString type = "text/html", optional DOMString replace = "");
    1.41 +  [Throws]
    1.42 +  WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
    1.43 +  [Throws]
    1.44 +  void close();
    1.45 +  [Throws]
    1.46 +  void write(DOMString... text);
    1.47 +  [Throws]
    1.48 +  void writeln(DOMString... text);
    1.49 +
    1.50 +           [SetterThrows]
    1.51 +           attribute DOMString designMode;
    1.52 +  [Throws]
    1.53 +  boolean execCommand(DOMString commandId, optional boolean showUI = false,
    1.54 +                      optional DOMString value = "");
    1.55 +  [Throws]
    1.56 +  boolean queryCommandEnabled(DOMString commandId);
    1.57 +  [Throws]
    1.58 +  boolean queryCommandIndeterm(DOMString commandId);
    1.59 +  [Throws]
    1.60 +  boolean queryCommandState(DOMString commandId);
    1.61 +  boolean queryCommandSupported(DOMString commandId);
    1.62 +  [Throws]
    1.63 +  DOMString queryCommandValue(DOMString commandId);
    1.64 +
    1.65 +  [TreatNullAs=EmptyString] attribute DOMString fgColor;
    1.66 +  [TreatNullAs=EmptyString] attribute DOMString linkColor;
    1.67 +  [TreatNullAs=EmptyString] attribute DOMString vlinkColor;
    1.68 +  [TreatNullAs=EmptyString] attribute DOMString alinkColor;
    1.69 +  [TreatNullAs=EmptyString] attribute DOMString bgColor;
    1.70 +
    1.71 +  [Pure]
    1.72 +  readonly attribute HTMLCollection anchors;
    1.73 +  [Pure]
    1.74 +  readonly attribute HTMLCollection applets;
    1.75 +
    1.76 +  void clear();
    1.77 +
    1.78 +  [Throws]
    1.79 +  readonly attribute object all;
    1.80 +
    1.81 +  // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections
    1.82 +  [Throws]
    1.83 +  Selection? getSelection();
    1.84 +
    1.85 +  // @deprecated These are old Netscape 4 methods. Do not use,
    1.86 +  //             the implementation is no-op.
    1.87 +  // XXXbz do we actually need these anymore?
    1.88 +  void                      captureEvents();
    1.89 +  void                      releaseEvents();
    1.90 +};

mercurial