2012-12-25 18:00:47 -08:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2013-04-20 09:04:09 -07:00
|
|
|
[OverrideBuiltins]
|
2012-12-25 18:00:47 -08:00
|
|
|
interface HTMLDocument : Document {
|
|
|
|
[Throws]
|
|
|
|
attribute DOMString? domain;
|
|
|
|
[Throws]
|
|
|
|
attribute DOMString cookie;
|
|
|
|
// DOM tree accessors
|
2012-12-20 01:56:11 -08:00
|
|
|
[Throws]
|
|
|
|
getter object (DOMString name);
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure, SetterThrows]
|
2012-12-25 18:00:47 -08:00
|
|
|
attribute HTMLElement? body;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLHeadElement? head;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection images;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection embeds;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection plugins;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection links;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection forms;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection scripts;
|
|
|
|
NodeList getElementsByName(DOMString elementName);
|
|
|
|
NodeList getItems(optional DOMString typeNames = ""); // microdata
|
|
|
|
|
|
|
|
// dynamic markup insertion
|
|
|
|
[Throws]
|
|
|
|
Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
|
|
|
[Throws]
|
|
|
|
WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
|
|
|
|
[Throws]
|
|
|
|
void close();
|
|
|
|
[Throws]
|
|
|
|
void write(DOMString... text);
|
|
|
|
[Throws]
|
|
|
|
void writeln(DOMString... text);
|
|
|
|
|
|
|
|
[SetterThrows]
|
|
|
|
attribute DOMString designMode;
|
|
|
|
[Throws]
|
|
|
|
boolean execCommand(DOMString commandId, optional boolean showUI = false,
|
|
|
|
optional DOMString value = "");
|
|
|
|
[Throws]
|
|
|
|
boolean queryCommandEnabled(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
boolean queryCommandIndeterm(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
boolean queryCommandState(DOMString commandId);
|
|
|
|
boolean queryCommandSupported(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
DOMString queryCommandValue(DOMString commandId);
|
|
|
|
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString fgColor;
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString linkColor;
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString vlinkColor;
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString alinkColor;
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString bgColor;
|
|
|
|
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection anchors;
|
2013-10-09 11:58:15 -07:00
|
|
|
[Pure]
|
2012-12-25 18:00:47 -08:00
|
|
|
readonly attribute HTMLCollection applets;
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
2014-05-20 12:52:21 -07:00
|
|
|
readonly attribute HTMLAllCollection all;
|
2013-06-11 23:55:00 -07:00
|
|
|
|
2012-12-25 18:00:47 -08:00
|
|
|
// https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections
|
|
|
|
[Throws]
|
2013-12-17 06:12:33 -08:00
|
|
|
Selection? getSelection();
|
2013-07-31 14:44:51 -07:00
|
|
|
|
|
|
|
// @deprecated These are old Netscape 4 methods. Do not use,
|
|
|
|
// the implementation is no-op.
|
|
|
|
// XXXbz do we actually need these anymore?
|
2014-02-09 00:04:39 -08:00
|
|
|
void captureEvents();
|
|
|
|
void releaseEvents();
|
2012-12-25 18:00:47 -08:00
|
|
|
};
|
2014-06-24 17:37:03 -07:00
|
|
|
|
|
|
|
partial interface HTMLDocument {
|
|
|
|
/*
|
|
|
|
* Number of nodes that have been blocked by
|
|
|
|
* the Safebrowsing API to prevent tracking.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute long blockedTrackingNodeCount;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* List of nodes that have been blocked by
|
|
|
|
* the Safebrowsing API to prevent tracking.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute NodeList blockedTrackingNodes;
|
|
|
|
};
|