Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 4 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | */ |
michael@0 | 6 | |
michael@0 | 7 | [OverrideBuiltins] |
michael@0 | 8 | interface HTMLDocument : Document { |
michael@0 | 9 | [Throws] |
michael@0 | 10 | attribute DOMString? domain; |
michael@0 | 11 | [Throws] |
michael@0 | 12 | attribute DOMString cookie; |
michael@0 | 13 | // DOM tree accessors |
michael@0 | 14 | [Throws] |
michael@0 | 15 | getter object (DOMString name); |
michael@0 | 16 | [Pure, SetterThrows] |
michael@0 | 17 | attribute HTMLElement? body; |
michael@0 | 18 | [Pure] |
michael@0 | 19 | readonly attribute HTMLHeadElement? head; |
michael@0 | 20 | [Pure] |
michael@0 | 21 | readonly attribute HTMLCollection images; |
michael@0 | 22 | [Pure] |
michael@0 | 23 | readonly attribute HTMLCollection embeds; |
michael@0 | 24 | [Pure] |
michael@0 | 25 | readonly attribute HTMLCollection plugins; |
michael@0 | 26 | [Pure] |
michael@0 | 27 | readonly attribute HTMLCollection links; |
michael@0 | 28 | [Pure] |
michael@0 | 29 | readonly attribute HTMLCollection forms; |
michael@0 | 30 | [Pure] |
michael@0 | 31 | readonly attribute HTMLCollection scripts; |
michael@0 | 32 | NodeList getElementsByName(DOMString elementName); |
michael@0 | 33 | NodeList getItems(optional DOMString typeNames = ""); // microdata |
michael@0 | 34 | |
michael@0 | 35 | // dynamic markup insertion |
michael@0 | 36 | [Throws] |
michael@0 | 37 | Document open(optional DOMString type = "text/html", optional DOMString replace = ""); |
michael@0 | 38 | [Throws] |
michael@0 | 39 | WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); |
michael@0 | 40 | [Throws] |
michael@0 | 41 | void close(); |
michael@0 | 42 | [Throws] |
michael@0 | 43 | void write(DOMString... text); |
michael@0 | 44 | [Throws] |
michael@0 | 45 | void writeln(DOMString... text); |
michael@0 | 46 | |
michael@0 | 47 | [SetterThrows] |
michael@0 | 48 | attribute DOMString designMode; |
michael@0 | 49 | [Throws] |
michael@0 | 50 | boolean execCommand(DOMString commandId, optional boolean showUI = false, |
michael@0 | 51 | optional DOMString value = ""); |
michael@0 | 52 | [Throws] |
michael@0 | 53 | boolean queryCommandEnabled(DOMString commandId); |
michael@0 | 54 | [Throws] |
michael@0 | 55 | boolean queryCommandIndeterm(DOMString commandId); |
michael@0 | 56 | [Throws] |
michael@0 | 57 | boolean queryCommandState(DOMString commandId); |
michael@0 | 58 | boolean queryCommandSupported(DOMString commandId); |
michael@0 | 59 | [Throws] |
michael@0 | 60 | DOMString queryCommandValue(DOMString commandId); |
michael@0 | 61 | |
michael@0 | 62 | [TreatNullAs=EmptyString] attribute DOMString fgColor; |
michael@0 | 63 | [TreatNullAs=EmptyString] attribute DOMString linkColor; |
michael@0 | 64 | [TreatNullAs=EmptyString] attribute DOMString vlinkColor; |
michael@0 | 65 | [TreatNullAs=EmptyString] attribute DOMString alinkColor; |
michael@0 | 66 | [TreatNullAs=EmptyString] attribute DOMString bgColor; |
michael@0 | 67 | |
michael@0 | 68 | [Pure] |
michael@0 | 69 | readonly attribute HTMLCollection anchors; |
michael@0 | 70 | [Pure] |
michael@0 | 71 | readonly attribute HTMLCollection applets; |
michael@0 | 72 | |
michael@0 | 73 | void clear(); |
michael@0 | 74 | |
michael@0 | 75 | [Throws] |
michael@0 | 76 | readonly attribute object all; |
michael@0 | 77 | |
michael@0 | 78 | // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections |
michael@0 | 79 | [Throws] |
michael@0 | 80 | Selection? getSelection(); |
michael@0 | 81 | |
michael@0 | 82 | // @deprecated These are old Netscape 4 methods. Do not use, |
michael@0 | 83 | // the implementation is no-op. |
michael@0 | 84 | // XXXbz do we actually need these anymore? |
michael@0 | 85 | void captureEvents(); |
michael@0 | 86 | void releaseEvents(); |
michael@0 | 87 | }; |