Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsIDOMDocument.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * The nsIDOMHTMLDocument interface is the interface to a [X]HTML |
michael@0 | 10 | * document object. |
michael@0 | 11 | * |
michael@0 | 12 | * @see <http://www.whatwg.org/html/> |
michael@0 | 13 | */ |
michael@0 | 14 | interface nsISelection; |
michael@0 | 15 | |
michael@0 | 16 | [scriptable, uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)] |
michael@0 | 17 | interface nsIDOMHTMLDocument : nsIDOMDocument |
michael@0 | 18 | { |
michael@0 | 19 | attribute DOMString domain; |
michael@0 | 20 | attribute DOMString cookie; |
michael@0 | 21 | |
michael@0 | 22 | readonly attribute nsIDOMHTMLHeadElement head; |
michael@0 | 23 | attribute nsIDOMHTMLElement body; |
michael@0 | 24 | |
michael@0 | 25 | readonly attribute nsIDOMHTMLCollection images; |
michael@0 | 26 | readonly attribute nsIDOMHTMLCollection embeds; |
michael@0 | 27 | // mapped to attribute embeds for NS4 compat |
michael@0 | 28 | readonly attribute nsIDOMHTMLCollection plugins; |
michael@0 | 29 | readonly attribute nsIDOMHTMLCollection links; |
michael@0 | 30 | readonly attribute nsIDOMHTMLCollection forms; |
michael@0 | 31 | readonly attribute nsIDOMHTMLCollection scripts; |
michael@0 | 32 | nsIDOMNodeList getElementsByName(in DOMString elementName); |
michael@0 | 33 | nsIDOMNodeList getItems([optional] in DOMString types); |
michael@0 | 34 | |
michael@0 | 35 | // If aContentType is not something supported by nsHTMLDocument and |
michael@0 | 36 | // the HTML content sink, trying to write to the document will |
michael@0 | 37 | // probably throw. |
michael@0 | 38 | // Pass aReplace = true to trigger a replacement of the previous |
michael@0 | 39 | // document in session history; pass false for normal history handling. |
michael@0 | 40 | [implicit_jscontext, optional_argc] |
michael@0 | 41 | nsISupports open([optional] in DOMString aContentTypeOrUrl, |
michael@0 | 42 | [optional] in DOMString aReplaceOrName, |
michael@0 | 43 | [optional] in DOMString aFeatures); |
michael@0 | 44 | void close(); |
michael@0 | 45 | |
michael@0 | 46 | [implicit_jscontext] |
michael@0 | 47 | void write([optional, Null(Stringify)] in DOMString text); |
michael@0 | 48 | [implicit_jscontext] |
michael@0 | 49 | void writeln([optional, Null(Stringify)] in DOMString text); |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * Midas additions |
michael@0 | 53 | */ |
michael@0 | 54 | attribute DOMString designMode; |
michael@0 | 55 | |
michael@0 | 56 | boolean execCommand(in DOMString commandID, |
michael@0 | 57 | [optional] in boolean doShowUI, |
michael@0 | 58 | [optional] in DOMString value); |
michael@0 | 59 | |
michael@0 | 60 | // returns true if the command is enabled (false otherwise) |
michael@0 | 61 | boolean queryCommandEnabled(in DOMString commandID); |
michael@0 | 62 | |
michael@0 | 63 | // returns true if the command is in a indeterminate state (false otherwise) |
michael@0 | 64 | boolean queryCommandIndeterm(in DOMString commandID); |
michael@0 | 65 | |
michael@0 | 66 | // returns true if the command has been executed (false otherwise) |
michael@0 | 67 | boolean queryCommandState(in DOMString commandID); |
michael@0 | 68 | |
michael@0 | 69 | // returns true if the command is supported on the current range |
michael@0 | 70 | boolean queryCommandSupported(in DOMString commandID); |
michael@0 | 71 | |
michael@0 | 72 | // returns the current value of the document or current selection for command |
michael@0 | 73 | DOMString queryCommandValue(in DOMString commandID); |
michael@0 | 74 | |
michael@0 | 75 | |
michael@0 | 76 | // Obsolete APIs |
michael@0 | 77 | attribute DOMString fgColor; |
michael@0 | 78 | attribute DOMString bgColor; |
michael@0 | 79 | attribute DOMString linkColor; |
michael@0 | 80 | attribute DOMString vlinkColor; |
michael@0 | 81 | attribute DOMString alinkColor; |
michael@0 | 82 | |
michael@0 | 83 | readonly attribute nsIDOMHTMLCollection anchors; |
michael@0 | 84 | readonly attribute nsIDOMHTMLCollection applets; |
michael@0 | 85 | |
michael@0 | 86 | void clear(); |
michael@0 | 87 | |
michael@0 | 88 | |
michael@0 | 89 | // DOM Range |
michael@0 | 90 | nsISelection getSelection(); |
michael@0 | 91 | |
michael@0 | 92 | |
michael@0 | 93 | // More obsolete APIs |
michael@0 | 94 | /** |
michael@0 | 95 | * @deprecated These are old Netscape 4 methods. Do not use, |
michael@0 | 96 | * the implementation is no-op. |
michael@0 | 97 | */ |
michael@0 | 98 | void captureEvents(); |
michael@0 | 99 | void releaseEvents(); |
michael@0 | 100 | }; |