2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-03-31 08:42:20 +04:00
|
|
|
/* 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/.
|
|
|
|
*
|
2018-01-26 08:53:34 +03:00
|
|
|
* https://dom.spec.whatwg.org/#interface-document
|
|
|
|
* https://html.spec.whatwg.org/multipage/dom.html#the-document-object
|
2018-03-13 04:44:56 +03:00
|
|
|
* https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
|
|
|
|
* https://fullscreen.spec.whatwg.org/#api
|
|
|
|
* https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
|
|
|
|
* https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
|
|
|
|
* https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
|
|
|
|
* https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
|
|
|
|
* https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
|
2018-10-01 09:09:44 +03:00
|
|
|
* https://wicg.github.io/feature-policy/#policy
|
2012-03-31 08:42:20 +04:00
|
|
|
*/
|
|
|
|
|
2019-05-22 02:14:27 +03:00
|
|
|
interface ContentSecurityPolicy;
|
2019-04-12 08:31:32 +03:00
|
|
|
interface Principal;
|
2012-12-22 12:27:27 +04:00
|
|
|
interface WindowProxy;
|
2012-12-24 02:33:33 +04:00
|
|
|
interface nsISupports;
|
2013-07-16 01:28:33 +04:00
|
|
|
interface URI;
|
2013-12-06 01:28:21 +04:00
|
|
|
interface nsIDocShell;
|
2015-04-16 00:19:21 +03:00
|
|
|
interface nsILoadGroup;
|
2019-06-06 10:23:37 +03:00
|
|
|
interface nsIReferrerInfo;
|
2019-12-04 18:39:26 +03:00
|
|
|
interface nsIPermissionDelegateHandler;
|
2019-08-09 22:57:50 +03:00
|
|
|
interface XULCommandDispatcher;
|
2012-12-22 12:27:27 +04:00
|
|
|
|
2017-12-15 01:28:22 +03:00
|
|
|
enum VisibilityState { "hidden", "visible" };
|
2012-12-26 02:00:15 +04:00
|
|
|
|
2016-06-06 13:43:39 +03:00
|
|
|
/* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
|
|
|
|
dictionary ElementCreationOptions {
|
|
|
|
DOMString is;
|
2017-03-17 10:30:34 +03:00
|
|
|
|
|
|
|
[ChromeOnly]
|
|
|
|
DOMString pseudo;
|
2016-06-06 13:43:39 +03:00
|
|
|
};
|
|
|
|
|
2018-01-26 08:53:34 +03:00
|
|
|
/* https://dom.spec.whatwg.org/#interface-document */
|
2019-09-27 18:26:14 +03:00
|
|
|
[Exposed=Window]
|
2012-03-31 08:42:20 +04:00
|
|
|
interface Document : Node {
|
2019-09-12 14:01:17 +03:00
|
|
|
[Throws]
|
|
|
|
constructor();
|
|
|
|
|
2013-01-30 02:53:53 +04:00
|
|
|
[Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMImplementation implementation;
|
2016-11-17 21:49:27 +03:00
|
|
|
[Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString URL;
|
2016-11-17 21:49:27 +03:00
|
|
|
[Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString documentURI;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString compatMode;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString characterSet;
|
2015-09-23 03:32:29 +03:00
|
|
|
[Pure,BinaryName="characterSet"]
|
|
|
|
readonly attribute DOMString charset; // legacy alias of .characterSet
|
|
|
|
[Pure,BinaryName="characterSet"]
|
|
|
|
readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString contentType;
|
|
|
|
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DocumentType? doctype;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute Element? documentElement;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
HTMLCollection getElementsByTagName(DOMString localName);
|
2014-02-03 20:03:54 +04:00
|
|
|
[Pure, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
HTMLCollection getElementsByClassName(DOMString classNames);
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
Element? getElementById(DOMString elementId);
|
|
|
|
|
2018-06-29 23:39:46 +03:00
|
|
|
// These DOM methods cannot be accessed by UA Widget scripts
|
|
|
|
// because the DOM element reflectors will be in the content scope,
|
|
|
|
// instead of the desired UA Widget scope.
|
|
|
|
[CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
|
2019-07-03 10:52:35 +03:00
|
|
|
Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
|
2018-06-29 23:39:46 +03:00
|
|
|
[CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
|
2019-07-03 10:52:35 +03:00
|
|
|
Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {});
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject]
|
2012-03-31 08:42:20 +04:00
|
|
|
DocumentFragment createDocumentFragment();
|
2018-06-29 23:39:46 +03:00
|
|
|
[NewObject, Func="IsNotUAWidget"]
|
2012-03-31 08:42:20 +04:00
|
|
|
Text createTextNode(DOMString data);
|
2018-06-29 23:39:46 +03:00
|
|
|
[NewObject, Func="IsNotUAWidget"]
|
2012-03-31 08:42:20 +04:00
|
|
|
Comment createComment(DOMString data);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
|
|
|
|
|
2018-06-29 23:39:46 +03:00
|
|
|
[CEReactions, Throws, Func="IsNotUAWidget"]
|
2013-12-20 23:28:17 +04:00
|
|
|
Node importNode(Node node, optional boolean deep = false);
|
2018-06-29 23:39:46 +03:00
|
|
|
[CEReactions, Throws, Func="IsNotUAWidget"]
|
2012-03-31 08:42:20 +04:00
|
|
|
Node adoptNode(Node node);
|
|
|
|
|
2017-04-20 15:45:37 +03:00
|
|
|
[NewObject, Throws, NeedsCallerType]
|
2012-12-22 12:27:27 +04:00
|
|
|
Event createEvent(DOMString interface);
|
2012-03-31 08:42:20 +04:00
|
|
|
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
Range createRange();
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
2012-03-31 08:42:20 +04:00
|
|
|
|
|
|
|
// NEW
|
2012-12-22 12:27:27 +04:00
|
|
|
// No support for prepend/append yet
|
|
|
|
// void prepend((Node or DOMString)... nodes);
|
|
|
|
// void append((Node or DOMString)... nodes);
|
|
|
|
|
|
|
|
// These are not in the spec, but leave them for now for backwards compat.
|
|
|
|
// So sort of like Gecko extensions
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
CDATASection createCDATASection(DOMString data);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
Attr createAttribute(DOMString name);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-12-22 12:27:27 +04:00
|
|
|
Attr createAttributeNS(DOMString? namespace, DOMString name);
|
|
|
|
};
|
|
|
|
|
2018-01-26 08:53:34 +03:00
|
|
|
// https://html.spec.whatwg.org/multipage/dom.html#the-document-object
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
[PutForwards=href, Unforgeable] readonly attribute Location? location;
|
2019-05-24 16:51:09 +03:00
|
|
|
[SetterThrows] attribute DOMString domain;
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute DOMString referrer;
|
2019-04-18 11:55:00 +03:00
|
|
|
[Throws] attribute DOMString cookie;
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute DOMString lastModified;
|
|
|
|
readonly attribute DOMString readyState;
|
|
|
|
|
|
|
|
// DOM tree accessors
|
|
|
|
//(Not proxy yet)getter object (DOMString name);
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
attribute DOMString title;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
attribute DOMString dir;
|
2018-01-26 08:53:34 +03:00
|
|
|
[CEReactions, Pure, SetterThrows]
|
|
|
|
attribute HTMLElement? body;
|
2018-03-13 04:44:56 +03:00
|
|
|
[Pure]
|
|
|
|
readonly attribute HTMLHeadElement? head;
|
2018-03-13 04:44:56 +03:00
|
|
|
[SameObject] readonly attribute HTMLCollection images;
|
|
|
|
[SameObject] readonly attribute HTMLCollection embeds;
|
|
|
|
[SameObject] readonly attribute HTMLCollection plugins;
|
2018-03-13 04:44:56 +03:00
|
|
|
[SameObject] readonly attribute HTMLCollection links;
|
2018-03-13 04:44:56 +03:00
|
|
|
[SameObject] readonly attribute HTMLCollection forms;
|
|
|
|
[SameObject] readonly attribute HTMLCollection scripts;
|
2017-11-08 19:13:33 +03:00
|
|
|
[Pure]
|
|
|
|
NodeList getElementsByName(DOMString elementName);
|
2012-12-22 12:27:27 +04:00
|
|
|
//(Not implemented)readonly attribute DOMElementMap cssElementMap;
|
|
|
|
|
|
|
|
// dynamic markup insertion
|
2019-05-28 02:03:03 +03:00
|
|
|
[CEReactions, Throws]
|
2019-07-11 19:30:27 +03:00
|
|
|
Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
|
2019-05-28 02:03:03 +03:00
|
|
|
[CEReactions, Throws]
|
2019-07-11 19:31:34 +03:00
|
|
|
WindowProxy? open(USVString url, DOMString name, DOMString features);
|
2019-05-28 02:03:03 +03:00
|
|
|
[CEReactions, Throws]
|
|
|
|
void close();
|
|
|
|
[CEReactions, Throws]
|
|
|
|
void write(DOMString... text);
|
|
|
|
[CEReactions, Throws]
|
|
|
|
void writeln(DOMString... text);
|
2012-12-22 12:27:27 +04:00
|
|
|
|
|
|
|
// user interaction
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute WindowProxy? defaultView;
|
|
|
|
[Throws]
|
|
|
|
boolean hasFocus();
|
2019-05-31 04:37:26 +03:00
|
|
|
[CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
|
|
|
|
attribute DOMString designMode;
|
|
|
|
[CEReactions, Throws, NeedsSubjectPrincipal]
|
|
|
|
boolean execCommand(DOMString commandId, optional boolean showUI = false,
|
|
|
|
optional DOMString value = "");
|
|
|
|
[Throws, NeedsSubjectPrincipal]
|
|
|
|
boolean queryCommandEnabled(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
boolean queryCommandIndeterm(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
boolean queryCommandState(DOMString commandId);
|
2019-05-30 20:14:05 +03:00
|
|
|
[Throws, NeedsCallerType]
|
2019-05-31 04:37:26 +03:00
|
|
|
boolean queryCommandSupported(DOMString commandId);
|
|
|
|
[Throws]
|
|
|
|
DOMString queryCommandValue(DOMString commandId);
|
2012-12-22 12:27:27 +04:00
|
|
|
//(Not implemented)readonly attribute HTMLCollection commands;
|
|
|
|
|
|
|
|
// special event handler IDL attributes that only apply to Document objects
|
2013-09-17 15:01:28 +04:00
|
|
|
[LenientThis] attribute EventHandler onreadystatechange;
|
2012-12-22 12:27:27 +04:00
|
|
|
|
|
|
|
// Gecko extensions?
|
2013-09-17 15:01:28 +04:00
|
|
|
attribute EventHandler onbeforescriptexecute;
|
|
|
|
attribute EventHandler onafterscriptexecute;
|
2015-08-12 20:26:01 +03:00
|
|
|
|
2015-12-08 23:42:21 +03:00
|
|
|
[Pref="dom.select_events.enabled"]
|
|
|
|
attribute EventHandler onselectionchange;
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
/**
|
|
|
|
* True if this document is synthetic : stand alone image, video, audio file,
|
|
|
|
* etc.
|
|
|
|
*/
|
2020-02-05 00:28:57 +03:00
|
|
|
[Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument;
|
2012-12-22 12:27:27 +04:00
|
|
|
/**
|
|
|
|
* Returns the script element whose script is currently being processed.
|
|
|
|
*
|
|
|
|
* @see <https://developer.mozilla.org/en/DOM/document.currentScript>
|
|
|
|
*/
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute Element? currentScript;
|
|
|
|
/**
|
|
|
|
* Release the current mouse capture if it is on an element within this
|
|
|
|
* document.
|
|
|
|
*
|
|
|
|
* @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
|
|
|
|
*/
|
|
|
|
void releaseCapture();
|
|
|
|
/**
|
|
|
|
* Use the given DOM element as the source image of target |-moz-element()|.
|
|
|
|
*
|
|
|
|
* This function introduces a new special ID (called "image element ID"),
|
|
|
|
* which is only used by |-moz-element()|, and associates it with the given
|
|
|
|
* DOM element. Image elements ID's have the higher precedence than general
|
|
|
|
* HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
|
|
|
|
* |-moz-element(#<id>)| uses |<element>| as the source image even if there
|
|
|
|
* is another element with id attribute = |<id>|. To unregister an image
|
|
|
|
* element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* <script>
|
|
|
|
* canvas = document.createElement("canvas");
|
|
|
|
* canvas.setAttribute("width", 100);
|
|
|
|
* canvas.setAttribute("height", 100);
|
|
|
|
* // draw to canvas
|
|
|
|
* document.mozSetImageElement("canvasbg", canvas);
|
|
|
|
* </script>
|
|
|
|
* <div style="background-image: -moz-element(#canvasbg);"></div>
|
|
|
|
*
|
|
|
|
* @param aImageElementId an image element ID to associate with
|
|
|
|
* |aImageElement|
|
|
|
|
* @param aImageElement a DOM element to be used as the source image of
|
|
|
|
* |-moz-element(#aImageElementId)|. If this is null, the function will
|
|
|
|
* unregister the image element ID |aImageElementId|.
|
|
|
|
*
|
|
|
|
* @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
|
|
|
|
*/
|
2020-04-27 23:00:09 +03:00
|
|
|
[UseCounter]
|
2012-12-22 12:27:27 +04:00
|
|
|
void mozSetImageElement(DOMString aImageElementId,
|
|
|
|
Element? aImageElement);
|
|
|
|
|
2013-02-22 18:56:29 +04:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute URI? documentURIObject;
|
|
|
|
|
2015-01-05 20:42:31 +03:00
|
|
|
/**
|
2019-08-21 16:24:45 +03:00
|
|
|
* Current referrer policy - one of the referrer policy value from
|
|
|
|
* ReferrerPolicy.webidl.
|
2015-01-05 20:42:31 +03:00
|
|
|
*/
|
|
|
|
[ChromeOnly]
|
2019-08-21 16:24:45 +03:00
|
|
|
readonly attribute ReferrerPolicy referrerPolicy;
|
2015-01-05 20:42:31 +03:00
|
|
|
|
2019-06-06 10:23:37 +03:00
|
|
|
/**
|
|
|
|
* Current referrer info, which holds all referrer related information
|
|
|
|
* including referrer policy and raw referrer of document.
|
|
|
|
*/
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute nsIReferrerInfo referrerInfo;
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
};
|
|
|
|
|
2018-03-13 04:44:56 +03:00
|
|
|
// https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
|
|
|
|
partial interface Document {
|
2019-06-04 10:30:59 +03:00
|
|
|
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString fgColor;
|
|
|
|
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString linkColor;
|
|
|
|
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
|
|
|
|
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString alinkColor;
|
|
|
|
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
2018-03-13 04:44:56 +03:00
|
|
|
|
2018-03-13 04:44:57 +03:00
|
|
|
[SameObject] readonly attribute HTMLCollection anchors;
|
2018-03-13 04:44:56 +03:00
|
|
|
[SameObject] readonly attribute HTMLCollection applets;
|
|
|
|
|
2019-07-09 00:59:10 +03:00
|
|
|
void clear();
|
|
|
|
// @deprecated These are old Netscape 4 methods. Do not use,
|
|
|
|
// the implementation is no-op.
|
|
|
|
// XXXbz do we actually need these anymore?
|
|
|
|
void captureEvents();
|
|
|
|
void releaseEvents();
|
2018-03-13 04:44:56 +03:00
|
|
|
|
2019-07-09 21:09:40 +03:00
|
|
|
[SameObject] readonly attribute HTMLAllCollection all;
|
2018-03-13 04:44:56 +03:00
|
|
|
};
|
|
|
|
|
2016-02-17 03:47:11 +03:00
|
|
|
// https://fullscreen.spec.whatwg.org/#api
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
// Note: Per spec the 'S' in these two is lowercase, but the "Moz"
|
2016-05-19 23:14:34 +03:00
|
|
|
// versions have it uppercase.
|
2019-12-13 16:27:27 +03:00
|
|
|
[LenientSetter, Unscopable]
|
2016-05-12 03:28:56 +03:00
|
|
|
readonly attribute boolean fullscreen;
|
2016-06-30 14:12:14 +03:00
|
|
|
[BinaryName="fullscreen"]
|
2016-05-12 03:28:56 +03:00
|
|
|
readonly attribute boolean mozFullScreen;
|
2019-12-13 16:27:27 +03:00
|
|
|
[LenientSetter, NeedsCallerType]
|
2016-02-17 03:47:11 +03:00
|
|
|
readonly attribute boolean fullscreenEnabled;
|
2016-11-17 21:49:27 +03:00
|
|
|
[BinaryName="fullscreenEnabled", NeedsCallerType]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute boolean mozFullScreenEnabled;
|
|
|
|
|
2019-12-13 16:27:27 +03:00
|
|
|
[Throws]
|
2018-09-18 02:25:10 +03:00
|
|
|
Promise<void> exitFullscreen();
|
|
|
|
[Throws, BinaryName="exitFullscreen"]
|
|
|
|
Promise<void> mozCancelFullScreen();
|
2016-05-24 06:21:22 +03:00
|
|
|
|
|
|
|
// Events handlers
|
|
|
|
attribute EventHandler onfullscreenchange;
|
|
|
|
attribute EventHandler onfullscreenerror;
|
2012-12-22 12:27:27 +04:00
|
|
|
};
|
|
|
|
|
2016-07-28 10:15:21 +03:00
|
|
|
// https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
|
|
|
|
// https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
2016-07-28 10:15:21 +03:00
|
|
|
void exitPointerLock();
|
|
|
|
|
|
|
|
// Event handlers
|
|
|
|
attribute EventHandler onpointerlockchange;
|
|
|
|
attribute EventHandler onpointerlockerror;
|
2012-12-22 12:27:27 +04:00
|
|
|
};
|
|
|
|
|
2019-12-19 00:55:32 +03:00
|
|
|
// Mozilla-internal document extensions specific to error pages.
|
2019-05-30 09:42:56 +03:00
|
|
|
partial interface Document {
|
2019-12-19 00:55:32 +03:00
|
|
|
[Func="Document::CallerIsTrustedAboutCertError"]
|
|
|
|
Promise<any> addCertException(boolean isTemporary);
|
|
|
|
|
2019-05-30 09:42:56 +03:00
|
|
|
[Func="Document::CallerIsTrustedAboutCertError", Throws]
|
|
|
|
FailedCertSecurityInfo getFailedCertSecurityInfo();
|
|
|
|
|
2019-09-17 10:51:57 +03:00
|
|
|
[Func="Document::CallerIsTrustedAboutNetError", Throws]
|
|
|
|
NetErrorInfo getNetErrorInfo();
|
2020-07-08 18:37:18 +03:00
|
|
|
|
|
|
|
[Func="Document::CallerIsTrustedAboutNetError"]
|
|
|
|
attribute boolean allowDeprecatedTls;
|
2019-09-17 10:51:57 +03:00
|
|
|
};
|
|
|
|
|
2017-07-26 23:22:42 +03:00
|
|
|
// https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
readonly attribute boolean hidden;
|
2012-12-26 02:00:15 +04:00
|
|
|
readonly attribute VisibilityState visibilityState;
|
2017-07-26 23:22:42 +03:00
|
|
|
attribute EventHandler onvisibilitychange;
|
2012-12-22 12:27:27 +04:00
|
|
|
};
|
|
|
|
|
2018-03-13 04:44:56 +03:00
|
|
|
// https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
attribute DOMString? selectedStyleSheetSet;
|
|
|
|
readonly attribute DOMString? lastStyleSheetSet;
|
|
|
|
readonly attribute DOMString? preferredStyleSheetSet;
|
|
|
|
[Constant]
|
|
|
|
readonly attribute DOMStringList styleSheetSets;
|
|
|
|
void enableStyleSheetsForSet (DOMString? name);
|
|
|
|
};
|
|
|
|
|
2018-03-13 04:44:56 +03:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
2013-01-07 21:56:48 +04:00
|
|
|
CaretPosition? caretPositionFromPoint (float x, float y);
|
2016-01-27 03:44:05 +03:00
|
|
|
|
|
|
|
readonly attribute Element? scrollingElement;
|
2013-01-04 10:54:26 +04:00
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dev.w3.org/2006/webapi/selectors-api2/#interface-definitions
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
2013-12-02 18:50:34 +04:00
|
|
|
[Throws, Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
Element? querySelector(DOMString selectors);
|
2013-12-02 18:50:34 +04:00
|
|
|
[Throws, Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
NodeList querySelectorAll(DOMString selectors);
|
|
|
|
|
|
|
|
//(Not implemented)Element? find(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
|
|
|
|
//(Not implemented)NodeList findAll(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
|
2013-01-10 19:49:07 +04:00
|
|
|
};
|
2012-12-22 12:27:27 +04:00
|
|
|
|
2017-12-15 23:55:55 +03:00
|
|
|
// https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
|
2014-05-13 11:22:12 +04:00
|
|
|
partial interface Document {
|
2019-01-02 16:05:23 +03:00
|
|
|
[Func="Document::AreWebAnimationsTimelinesEnabled"]
|
2015-04-10 04:34:22 +03:00
|
|
|
readonly attribute DocumentTimeline timeline;
|
2014-05-13 11:22:12 +04:00
|
|
|
};
|
|
|
|
|
2016-09-29 04:32:43 +03:00
|
|
|
// https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
|
|
|
|
partial interface Document {
|
|
|
|
[BinaryName="SVGRootElement"]
|
|
|
|
readonly attribute SVGSVGElement? rootElement;
|
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// Mozilla extensions of various sorts
|
|
|
|
partial interface Document {
|
2018-07-28 00:24:23 +03:00
|
|
|
// Creates a new XUL element regardless of the document's default type.
|
2020-02-05 00:28:57 +03:00
|
|
|
[ChromeOnly, CEReactions, NewObject, Throws]
|
2019-07-03 10:52:35 +03:00
|
|
|
Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
|
2019-04-16 21:15:04 +03:00
|
|
|
// Wether the document was loaded using a nsXULPrototypeDocument.
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean loadedFromPrototype;
|
2012-12-22 12:27:27 +04:00
|
|
|
|
2019-04-12 08:31:32 +03:00
|
|
|
// The principal to use for the storage area of this document
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute Principal effectiveStoragePrincipal;
|
|
|
|
|
2020-06-03 09:09:52 +03:00
|
|
|
// You should probably not be using this principal getter since it performs
|
|
|
|
// no checks to ensure that the partitioned principal should really be used
|
|
|
|
// here. It is only designed to be used in very specific circumstances, such
|
|
|
|
// as when inheriting the document/storage principal.
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute Principal partitionedPrincipal;
|
|
|
|
|
2019-08-19 17:38:32 +03:00
|
|
|
// The principal to use for the content blocking allow list
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute Principal? contentBlockingAllowListPrincipal;
|
|
|
|
|
2018-05-29 20:39:06 +03:00
|
|
|
// Touch bits
|
2012-12-22 12:27:27 +04:00
|
|
|
// XXXbz I can't find the sane spec for this stuff, so just cribbing
|
|
|
|
// from our xpidl for now.
|
2019-03-04 14:35:53 +03:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
|
2012-12-22 12:27:27 +04:00
|
|
|
Touch createTouch(optional Window? view = null,
|
2013-04-19 12:49:20 +04:00
|
|
|
optional EventTarget? target = null,
|
2012-12-22 12:27:27 +04:00
|
|
|
optional long identifier = 0,
|
|
|
|
optional long pageX = 0,
|
|
|
|
optional long pageY = 0,
|
|
|
|
optional long screenX = 0,
|
|
|
|
optional long screenY = 0,
|
|
|
|
optional long clientX = 0,
|
|
|
|
optional long clientY = 0,
|
|
|
|
optional long radiusX = 0,
|
|
|
|
optional long radiusY = 0,
|
|
|
|
optional float rotationAngle = 0,
|
|
|
|
optional float force = 0);
|
2012-12-31 22:37:22 +04:00
|
|
|
// XXXbz a hack to get around the fact that we don't support variadics as
|
|
|
|
// distinguishing arguments yet. Once this hack is removed. we can also
|
2019-01-02 16:05:23 +03:00
|
|
|
// remove the corresponding overload on Document, since Touch... and
|
2012-12-31 22:37:22 +04:00
|
|
|
// sequence<Touch> look the same in the C++.
|
2019-03-04 14:35:53 +03:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
|
2012-12-31 22:37:22 +04:00
|
|
|
TouchList createTouchList(Touch touch, Touch... touches);
|
|
|
|
// XXXbz and another hack for the fact that we can't usefully have optional
|
|
|
|
// distinguishing arguments but need a working zero-arg form of
|
|
|
|
// createTouchList().
|
2019-03-04 14:35:53 +03:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
|
2012-12-31 22:37:22 +04:00
|
|
|
TouchList createTouchList();
|
2019-03-04 14:35:53 +03:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
|
2012-12-22 12:27:27 +04:00
|
|
|
TouchList createTouchList(sequence<Touch> touches);
|
2013-05-16 11:13:35 +04:00
|
|
|
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute boolean styleSheetChangeEventsEnabled;
|
2013-07-16 01:28:33 +04:00
|
|
|
|
2014-01-30 21:31:34 +04:00
|
|
|
[ChromeOnly] readonly attribute DOMString contentLanguage;
|
2015-04-16 00:19:21 +03:00
|
|
|
|
|
|
|
[ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
|
2016-02-16 02:46:49 +03:00
|
|
|
|
2017-03-17 02:47:35 +03:00
|
|
|
// Blocks the initial document parser until the given promise is settled.
|
|
|
|
[ChromeOnly, Throws]
|
2017-09-21 02:12:27 +03:00
|
|
|
Promise<any> blockParsing(Promise<any> promise,
|
2019-07-03 10:52:35 +03:00
|
|
|
optional BlockParsingOptions options = {});
|
2017-03-17 02:47:35 +03:00
|
|
|
|
2016-02-16 02:46:49 +03:00
|
|
|
// like documentURI, except that for error pages, it returns the URI we were
|
|
|
|
// trying to load when we hit an error, rather than the error page's own URI.
|
|
|
|
[ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
|
2018-02-23 00:55:40 +03:00
|
|
|
|
|
|
|
// A promise that is resolved, with this document itself, when we have both
|
|
|
|
// fired DOMContentLoaded and are ready to start layout. This is used for the
|
|
|
|
// "document_idle" webextension script injection point.
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
readonly attribute Promise<Document> documentReadyForIdle;
|
2018-08-06 20:52:53 +03:00
|
|
|
|
2018-08-07 19:29:14 +03:00
|
|
|
// Lazily created command dispatcher, returns null if the document is not
|
|
|
|
// chrome privileged.
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute XULCommandDispatcher? commandDispatcher;
|
|
|
|
|
2018-08-06 20:52:53 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
attribute Node? popupNode;
|
|
|
|
|
2019-08-23 17:35:05 +03:00
|
|
|
// The JS debugger uses DOM mutation events to implement DOM mutation
|
|
|
|
// breakpoints. This is used to avoid logging a warning that the user
|
|
|
|
// cannot address and have no control over.
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute boolean dontWarnAboutMutationEventsAndAllowSlowDOMMutations;
|
|
|
|
|
2018-08-06 20:52:53 +03:00
|
|
|
/**
|
|
|
|
* These attributes correspond to rangeParent and rangeOffset. They will help
|
|
|
|
* you find where in the DOM the popup is happening. Can be accessed only
|
|
|
|
* during a popup event. Accessing any other time will be an error.
|
|
|
|
*/
|
|
|
|
[Throws, ChromeOnly]
|
|
|
|
readonly attribute Node? popupRangeParent;
|
|
|
|
[Throws, ChromeOnly]
|
|
|
|
readonly attribute long popupRangeOffset;
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute Node? tooltipNode;
|
2020-08-08 00:03:16 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns all the shadow roots connected to the document, in no particular
|
|
|
|
* order, and without regard to open/closed-ness. Also returns UA widgets
|
|
|
|
* (like <video> controls), which can be checked using
|
|
|
|
* ShadowRoot.isUAWidget().
|
|
|
|
*/
|
|
|
|
[ChromeOnly]
|
|
|
|
sequence<ShadowRoot> getConnectedShadowRoots();
|
2012-03-31 08:42:20 +04:00
|
|
|
};
|
|
|
|
|
2017-09-21 02:12:27 +03:00
|
|
|
dictionary BlockParsingOptions {
|
|
|
|
/**
|
|
|
|
* If true, blocks script-created parsers (created via document.open()) in
|
|
|
|
* addition to network-created parsers.
|
|
|
|
*/
|
|
|
|
boolean blockScriptCreated = true;
|
|
|
|
};
|
|
|
|
|
2013-06-29 07:13:22 +04:00
|
|
|
// Extension to give chrome JS the ability to determine when a document was
|
|
|
|
// created to satisfy an iframe with srcdoc attribute.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly] readonly attribute boolean isSrcdocDocument;
|
|
|
|
};
|
|
|
|
|
2016-06-19 22:34:08 +03:00
|
|
|
|
|
|
|
// Extension to give chrome JS the ability to get the underlying
|
|
|
|
// sandbox flag attribute
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-10-28 13:15:25 +03:00
|
|
|
/**
|
|
|
|
* Chrome document anonymous content management.
|
|
|
|
* This is a Chrome-only API that allows inserting fixed positioned anonymous
|
|
|
|
* content on top of the current page displayed in the document.
|
|
|
|
* The supplied content is cloned and inserted into the document's CanvasFrame.
|
|
|
|
* Note that this only works for HTML documents.
|
|
|
|
*/
|
|
|
|
partial interface Document {
|
|
|
|
/**
|
|
|
|
* Deep-clones the provided element and inserts it into the CanvasFrame.
|
|
|
|
* Returns an AnonymousContent instance that can be used to manipulate the
|
|
|
|
* inserted element.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, NewObject, Throws]
|
|
|
|
AnonymousContent insertAnonymousContent(Element aElement);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes the element inserted into the CanvasFrame given an AnonymousContent
|
|
|
|
* instance.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
void removeAnonymousContent(AnonymousContent aContent);
|
|
|
|
};
|
|
|
|
|
2017-08-10 16:53:42 +03:00
|
|
|
// http://w3c.github.io/selection-api/#extensions-to-document-interface
|
|
|
|
partial interface Document {
|
|
|
|
[Throws]
|
|
|
|
Selection? getSelection();
|
|
|
|
};
|
|
|
|
|
2018-09-13 02:20:28 +03:00
|
|
|
// https://github.com/whatwg/html/issues/3338
|
|
|
|
partial interface Document {
|
|
|
|
[Pref="dom.storage_access.enabled", Throws]
|
|
|
|
Promise<boolean> hasStorageAccess();
|
|
|
|
[Pref="dom.storage_access.enabled", Throws]
|
|
|
|
Promise<void> requestStorageAccess();
|
|
|
|
};
|
|
|
|
|
2019-01-15 03:13:34 +03:00
|
|
|
enum DocumentAutoplayPolicy {
|
|
|
|
"allowed", // autoplay is currently allowed
|
|
|
|
"allowed-muted", // muted video autoplay is currently allowed
|
|
|
|
"disallowed" // autoplay is not current allowed
|
|
|
|
};
|
|
|
|
|
|
|
|
// https://github.com/WICG/autoplay/issues/1
|
|
|
|
partial interface Document {
|
|
|
|
[Pref="dom.media.autoplay.autoplay-policy-api"]
|
|
|
|
readonly attribute DocumentAutoplayPolicy autoplayPolicy;
|
|
|
|
};
|
|
|
|
|
2015-09-26 16:54:29 +03:00
|
|
|
// Extension to give chrome JS the ability to determine whether
|
|
|
|
// the user has interacted with the document or not.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly] readonly attribute boolean userHasInteracted;
|
|
|
|
};
|
|
|
|
|
2019-09-07 01:48:52 +03:00
|
|
|
// Extension to give chrome JS the ability to simulate activate the document
|
2018-01-11 12:26:30 +03:00
|
|
|
// by user gesture.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly]
|
Bug 1470346 - Gesture activate all documents in tab, even across origins, upon user interaction. r=smaug
Sometimes when video is playing, a preroll ad plays, and that may be in a cross
origin iframe. If autoplay media is disabled, we require a user gesture in a
document before playback in that document is permitted, and we require each
origin to be gesture activated separately. So in the cross origin preroll video
add case, then the user will have to click once to unblock playback for the
cross origin ad, and then once the preroll ad finishes, the user will have to
click again to activate playback of the same origin content video.
This is a bad user experience.
So we should instead make gesture activation propagate up the doc tree
irrespective of crossing origins. This way, when the user clicks to activate,
all documents in that tab are also also effectively gesture activated, and so
can autoplay.
MozReview-Commit-ID: 1HZQ5zkubR
--HG--
extra : rebase_source : d6b75732548cb1d73b9f82dce60a5e6e97d1da14
2018-06-22 02:52:20 +03:00
|
|
|
void notifyUserGestureActivation();
|
2019-01-11 21:45:31 +03:00
|
|
|
// For testing only.
|
|
|
|
[ChromeOnly]
|
|
|
|
void clearUserGestureActivation();
|
2019-09-03 01:45:11 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean hasBeenUserGestureActivated;
|
2019-09-07 01:48:52 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean hasValidTransientUserGestureActivation;
|
2019-09-20 14:10:13 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
boolean consumeTransientUserGestureActivation();
|
2018-01-11 12:26:30 +03:00
|
|
|
};
|
|
|
|
|
2019-01-03 19:39:12 +03:00
|
|
|
// Extension to give chrome JS the ability to set an event handler which is
|
|
|
|
// called with certain events that happened while events were suppressed in the
|
|
|
|
// document or one of its subdocuments.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly]
|
|
|
|
void setSuppressedEventListener(EventListener? aListener);
|
|
|
|
};
|
|
|
|
|
2019-05-22 02:14:27 +03:00
|
|
|
// Allows frontend code to query a CSP which needs to be passed for a
|
|
|
|
// new load into docshell. Further, allows to query the CSP in JSON
|
|
|
|
// format for testing purposes.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly] readonly attribute ContentSecurityPolicy? csp;
|
|
|
|
[ChromeOnly] readonly attribute DOMString cspJSON;
|
|
|
|
};
|
|
|
|
|
2017-02-14 00:39:40 +03:00
|
|
|
// For more information on Flash classification, see
|
|
|
|
// toolkit/components/url-classifier/flash-block-lists.rst
|
|
|
|
enum FlashClassification {
|
|
|
|
"unknown", // Site is not on the whitelist or blacklist
|
|
|
|
"allowed", // Site is on the Flash whitelist
|
|
|
|
"denied" // Site is on the Flash blacklist
|
|
|
|
};
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute FlashClassification documentFlashClassification;
|
|
|
|
};
|
|
|
|
|
2018-09-07 04:26:18 +03:00
|
|
|
partial interface Document {
|
2019-01-02 16:05:23 +03:00
|
|
|
[Func="Document::DocumentSupportsL10n"] readonly attribute DocumentL10n? l10n;
|
2018-09-07 04:26:18 +03:00
|
|
|
};
|
|
|
|
|
2019-09-24 13:10:47 +03:00
|
|
|
Document includes XPathEvaluatorMixin;
|
2019-09-06 22:34:55 +03:00
|
|
|
Document includes GlobalEventHandlers;
|
|
|
|
Document includes DocumentAndElementEventHandlers;
|
2019-09-24 18:22:26 +03:00
|
|
|
Document includes TouchEventHandlers;
|
|
|
|
Document includes ParentNode;
|
|
|
|
Document includes OnErrorEventHandlerForNodes;
|
|
|
|
Document includes GeometryUtils;
|
|
|
|
Document includes FontFaceSource;
|
|
|
|
Document includes DocumentOrShadowRoot;
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2019-07-08 03:10:56 +03:00
|
|
|
// https://w3c.github.io/webappsec-feature-policy/#idl-index
|
2018-10-01 09:09:44 +03:00
|
|
|
partial interface Document {
|
2018-11-15 01:58:52 +03:00
|
|
|
[SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
|
2019-07-08 03:10:56 +03:00
|
|
|
readonly attribute FeaturePolicy featurePolicy;
|
2018-10-01 09:09:44 +03:00
|
|
|
};
|
2019-03-18 17:55:51 +03:00
|
|
|
|
2019-05-31 04:37:26 +03:00
|
|
|
// Extension to give chrome JS the ability to specify a non-default keypress
|
|
|
|
// event model.
|
|
|
|
partial interface Document {
|
|
|
|
/**
|
|
|
|
* setKeyPressEventModel() is called when we need to check whether the web
|
|
|
|
* app requires specific keypress event model or not.
|
|
|
|
*
|
|
|
|
* @param aKeyPressEventModel Proper keypress event model for the web app.
|
|
|
|
* KEYPRESS_EVENT_MODEL_DEFAULT:
|
|
|
|
* Use default keypress event model. I.e., depending on
|
|
|
|
* "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value"
|
|
|
|
* pref.
|
|
|
|
* KEYPRESS_EVENT_MODEL_SPLIT:
|
|
|
|
* Use split model. I.e, if keypress event inputs a character,
|
|
|
|
* keyCode should be 0. Otherwise, charCode should be 0.
|
|
|
|
* KEYPRESS_EVENT_MODEL_CONFLATED:
|
|
|
|
* Use conflated model. I.e., keyCode and charCode values of each
|
|
|
|
* keypress event should be set to same value.
|
|
|
|
*/
|
|
|
|
[ChromeOnly]
|
|
|
|
const unsigned short KEYPRESS_EVENT_MODEL_DEFAULT = 0;
|
|
|
|
[ChromeOnly]
|
|
|
|
const unsigned short KEYPRESS_EVENT_MODEL_SPLIT = 1;
|
|
|
|
[ChromeOnly]
|
|
|
|
const unsigned short KEYPRESS_EVENT_MODEL_CONFLATED = 2;
|
|
|
|
[ChromeOnly]
|
|
|
|
void setKeyPressEventModel(unsigned short aKeyPressEventModel);
|
|
|
|
};
|
2019-07-29 22:32:51 +03:00
|
|
|
|
|
|
|
// Extensions to return information about about the nodes blocked by the
|
|
|
|
// Safebrowsing API inside a document.
|
|
|
|
partial interface Document {
|
|
|
|
/*
|
|
|
|
* Number of nodes that have been blocked by the Safebrowsing API to prevent
|
|
|
|
* tracking, cryptomining and so on. This method is for testing only.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute long blockedNodeByClassifierCount;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* List of nodes that have been blocked by the Safebrowsing API to prevent
|
|
|
|
* tracking, fingerprinting, cryptomining and so on. This method is for
|
|
|
|
* testing only.
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute NodeList blockedNodesByClassifier;
|
|
|
|
};
|
2019-07-29 22:32:53 +03:00
|
|
|
|
|
|
|
// Extension to programmatically simulate a user interaction on a document,
|
|
|
|
// used for testing.
|
|
|
|
partial interface Document {
|
|
|
|
[ChromeOnly, BinaryName="setUserHasInteracted"]
|
|
|
|
void userInteractionForTesting();
|
|
|
|
};
|
2019-12-04 18:39:26 +03:00
|
|
|
|
|
|
|
// Extension for permission delegation.
|
|
|
|
partial interface Document {
|
2020-01-06 18:28:12 +03:00
|
|
|
[ChromeOnly, Pure]
|
2019-12-04 18:39:26 +03:00
|
|
|
readonly attribute nsIPermissionDelegateHandler permDelegateHandler;
|
|
|
|
};
|