2012-03-31 08:42:20 +04: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/.
|
|
|
|
*
|
2012-12-22 12:27:27 +04:00
|
|
|
* http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIDOMDocument.idl
|
2012-03-31 08:42:20 +04:00
|
|
|
*/
|
|
|
|
|
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;
|
2012-12-22 12:27:27 +04:00
|
|
|
|
2012-12-26 02:00:15 +04:00
|
|
|
enum VisibilityState { "hidden", "visible" };
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
/* http://dom.spec.whatwg.org/#interface-document */
|
|
|
|
[Constructor]
|
2012-03-31 08:42:20 +04:00
|
|
|
interface Document : Node {
|
2013-01-30 02:53:53 +04:00
|
|
|
[Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMImplementation implementation;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-03-31 08:42:20 +04:00
|
|
|
readonly attribute DOMString URL;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
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);
|
|
|
|
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
Element createElement(DOMString localName);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject]
|
2012-03-31 08:42:20 +04:00
|
|
|
DocumentFragment createDocumentFragment();
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject]
|
2012-03-31 08:42:20 +04:00
|
|
|
Text createTextNode(DOMString data);
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject]
|
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);
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
[Throws]
|
2013-12-20 23:28:17 +04:00
|
|
|
Node importNode(Node node, optional boolean deep = false);
|
2012-12-22 12:27:27 +04:00
|
|
|
[Throws]
|
2012-03-31 08:42:20 +04:00
|
|
|
Node adoptNode(Node node);
|
|
|
|
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Throws]
|
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);
|
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/#the-document-object
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
[PutForwards=href, Unforgeable] readonly attribute Location? location;
|
|
|
|
//(HTML only) attribute DOMString domain;
|
|
|
|
readonly attribute DOMString referrer;
|
|
|
|
//(HTML only) attribute DOMString cookie;
|
|
|
|
readonly attribute DOMString lastModified;
|
|
|
|
readonly attribute DOMString readyState;
|
|
|
|
|
|
|
|
// DOM tree accessors
|
|
|
|
//(Not proxy yet)getter object (DOMString name);
|
2013-11-26 05:59:39 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
attribute DOMString title;
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
attribute DOMString dir;
|
|
|
|
//(HTML only) attribute HTMLElement? body;
|
|
|
|
//(HTML only)readonly attribute HTMLHeadElement? head;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection images;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection embeds;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection plugins;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection links;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection forms;
|
|
|
|
//(HTML only)readonly attribute HTMLCollection scripts;
|
|
|
|
//(HTML only)NodeList getElementsByName(DOMString elementName);
|
|
|
|
//(HTML only)NodeList getItems(optional DOMString typeNames); // microdata
|
|
|
|
//(Not implemented)readonly attribute DOMElementMap cssElementMap;
|
|
|
|
|
|
|
|
// dynamic markup insertion
|
|
|
|
//(HTML only)Document open(optional DOMString type, optional DOMString replace);
|
|
|
|
//(HTML only)WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace);
|
|
|
|
//(HTML only)void close();
|
|
|
|
//(HTML only)void write(DOMString... text);
|
|
|
|
//(HTML only)void writeln(DOMString... text);
|
|
|
|
|
|
|
|
// user interaction
|
2013-11-26 05:59:39 +04:00
|
|
|
[Pure]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute WindowProxy? defaultView;
|
|
|
|
readonly attribute Element? activeElement;
|
|
|
|
[Throws]
|
|
|
|
boolean hasFocus();
|
|
|
|
//(HTML only) attribute DOMString designMode;
|
|
|
|
//(HTML only)boolean execCommand(DOMString commandId);
|
|
|
|
//(HTML only)boolean execCommand(DOMString commandId, boolean showUI);
|
|
|
|
//(HTML only)boolean execCommand(DOMString commandId, boolean showUI, DOMString value);
|
|
|
|
//(HTML only)boolean queryCommandEnabled(DOMString commandId);
|
|
|
|
//(HTML only)boolean queryCommandIndeterm(DOMString commandId);
|
|
|
|
//(HTML only)boolean queryCommandState(DOMString commandId);
|
|
|
|
//(HTML only)boolean queryCommandSupported(DOMString commandId);
|
|
|
|
//(HTML only)DOMString queryCommandValue(DOMString commandId);
|
|
|
|
//(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 onwheel;
|
|
|
|
attribute EventHandler oncopy;
|
|
|
|
attribute EventHandler oncut;
|
|
|
|
attribute EventHandler onpaste;
|
|
|
|
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.
|
|
|
|
*/
|
2013-10-28 21:27:53 +04:00
|
|
|
[Func="IsChromeOrXBL"] 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>
|
|
|
|
*/
|
|
|
|
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
|
|
|
/**
|
|
|
|
* Current referrer policy - one of the REFERRER_POLICY_* constants
|
|
|
|
* from nsIHttpChannel.
|
|
|
|
*/
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute unsigned long referrerPolicy;
|
|
|
|
|
2012-12-22 12:27:27 +04: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"
|
|
|
|
// versions hve it uppercase.
|
2016-02-17 03:47:11 +03:00
|
|
|
readonly attribute boolean fullscreenEnabled;
|
|
|
|
[BinaryName="fullscreenEnabled", Deprecated="PrefixedFullscreenAPI"]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute boolean mozFullScreenEnabled;
|
2016-02-17 03:47:11 +03:00
|
|
|
readonly attribute Element? fullscreenElement;
|
|
|
|
[BinaryName="fullscreenElement", Deprecated="PrefixedFullscreenAPI"]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute Element? mozFullScreenElement;
|
|
|
|
|
2016-02-17 03:47:11 +03:00
|
|
|
void exitFullscreen();
|
|
|
|
[BinaryName="exitFullscreen", Deprecated="PrefixedFullscreenAPI"]
|
|
|
|
void mozCancelFullScreen();
|
2012-12-22 12:27:27 +04:00
|
|
|
|
|
|
|
// Gecko-specific fullscreen bits
|
2016-02-17 03:47:11 +03:00
|
|
|
[Deprecated="PrefixedFullscreenAPI"]
|
2012-12-22 12:27:27 +04:00
|
|
|
readonly attribute boolean mozFullScreen;
|
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
readonly attribute Element? mozPointerLockElement;
|
|
|
|
void mozExitPointerLock ();
|
|
|
|
};
|
|
|
|
|
2012-11-01 22:18:08 +04:00
|
|
|
//http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
|
|
|
|
partial interface Document {
|
2014-07-08 06:02:03 +04:00
|
|
|
[Throws, Func="nsDocument::IsWebComponentsEnabled"]
|
2014-02-24 01:01:26 +04:00
|
|
|
object registerElement(DOMString name, optional ElementRegistrationOptions options);
|
|
|
|
};
|
|
|
|
|
|
|
|
//http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
|
|
|
|
partial interface Document {
|
|
|
|
[NewObject, Throws]
|
|
|
|
Element createElement(DOMString localName, DOMString typeExtension);
|
|
|
|
[NewObject, Throws]
|
|
|
|
Element createElementNS(DOMString? namespace, DOMString qualifiedName, DOMString typeExtension);
|
2012-11-01 22:18:08 +04:00
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#sec-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
readonly attribute boolean hidden;
|
|
|
|
readonly attribute boolean mozHidden;
|
2012-12-26 02:00:15 +04:00
|
|
|
readonly attribute VisibilityState visibilityState;
|
|
|
|
readonly attribute VisibilityState mozVisibilityState;
|
2012-12-22 12:27:27 +04:00
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
[Constant]
|
|
|
|
readonly attribute StyleSheetList styleSheets;
|
|
|
|
attribute DOMString? selectedStyleSheetSet;
|
|
|
|
readonly attribute DOMString? lastStyleSheetSet;
|
|
|
|
readonly attribute DOMString? preferredStyleSheetSet;
|
|
|
|
[Constant]
|
|
|
|
readonly attribute DOMStringList styleSheetSets;
|
|
|
|
void enableStyleSheetsForSet (DOMString? name);
|
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-document-interface
|
2012-12-22 12:27:27 +04:00
|
|
|
partial interface Document {
|
|
|
|
Element? elementFromPoint (float x, float y);
|
2016-01-16 23:21:43 +03:00
|
|
|
sequence<Element> elementsFromPoint (float x, float y);
|
2013-01-07 21:56:48 +04:00
|
|
|
CaretPosition? caretPositionFromPoint (float x, float y);
|
2016-01-27 03:44:05 +03:00
|
|
|
|
|
|
|
[Pref="dom.document.scrollingElement.enabled"]
|
|
|
|
readonly attribute Element? scrollingElement;
|
2013-01-04 10:54:26 +04:00
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// http://dvcs.w3.org/hg/undomanager/raw-file/tip/undomanager.html
|
2013-01-04 10:54:26 +04:00
|
|
|
partial interface Document {
|
|
|
|
[Pref="dom.undo_manager.enabled"]
|
|
|
|
readonly attribute UndoManager? undoManager;
|
|
|
|
};
|
2012-12-22 12:27:27 +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
|
|
|
|
2015-04-10 04:34:22 +03:00
|
|
|
// http://w3c.github.io/web-animations/#extensions-to-the-document-interface
|
2014-05-13 11:22:12 +04:00
|
|
|
partial interface Document {
|
2015-01-08 07:53:24 +03:00
|
|
|
[Func="nsDocument::IsWebAnimationsEnabled"]
|
2015-04-10 04:34:22 +03:00
|
|
|
readonly attribute DocumentTimeline timeline;
|
2016-01-06 22:21:00 +03:00
|
|
|
[Func="nsDocument::IsWebAnimationsEnabled"]
|
|
|
|
sequence<Animation> getAnimations();
|
2014-05-13 11:22:12 +04:00
|
|
|
};
|
|
|
|
|
2013-01-10 19:49:07 +04:00
|
|
|
// Mozilla extensions of various sorts
|
|
|
|
partial interface Document {
|
2012-12-22 12:27:27 +04:00
|
|
|
// nsIDOMDocumentXBL. Wish we could make these [ChromeOnly], but
|
|
|
|
// that would likely break bindings running with the page principal.
|
2013-09-06 20:12:56 +04:00
|
|
|
[Func="IsChromeOrXBL"]
|
2012-12-22 12:27:27 +04:00
|
|
|
NodeList? getAnonymousNodes(Element elt);
|
2013-09-06 20:12:56 +04:00
|
|
|
[Func="IsChromeOrXBL"]
|
2012-12-22 12:27:27 +04:00
|
|
|
Element? getAnonymousElementByAttribute(Element elt, DOMString attrName,
|
|
|
|
DOMString attrValue);
|
2013-09-06 20:12:56 +04:00
|
|
|
[Func="IsChromeOrXBL"]
|
2012-12-22 12:27:27 +04:00
|
|
|
Element? getBindingParent(Node node);
|
2013-09-06 20:12:56 +04:00
|
|
|
[Throws, Func="IsChromeOrXBL"]
|
2012-12-22 12:27:27 +04:00
|
|
|
void loadBindingDocument(DOMString documentURL);
|
|
|
|
|
|
|
|
// nsIDOMDocumentTouch
|
|
|
|
// XXXbz I can't find the sane spec for this stuff, so just cribbing
|
|
|
|
// from our xpidl for now.
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
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
|
|
|
|
// remove the corresponding overload on nsIDocument, since Touch... and
|
|
|
|
// sequence<Touch> look the same in the C++.
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
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().
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2012-12-31 22:37:22 +04:00
|
|
|
TouchList createTouchList();
|
2013-09-30 20:32:22 +04:00
|
|
|
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
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
|
|
|
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
void obsoleteSheet(URI sheetURI);
|
|
|
|
[ChromeOnly, Throws]
|
|
|
|
void obsoleteSheet(DOMString sheetURI);
|
2013-12-06 01:28:21 +04:00
|
|
|
|
|
|
|
[ChromeOnly] readonly attribute nsIDocShell? docShell;
|
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
|
|
|
|
|
|
|
// 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;
|
2012-03-31 08:42:20 +04:00
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2012-12-22 12:27:27 +04:00
|
|
|
Document implements XPathEvaluator;
|
2013-01-29 17:44:00 +04:00
|
|
|
Document implements GlobalEventHandlers;
|
2013-02-19 20:54:41 +04:00
|
|
|
Document implements TouchEventHandlers;
|
2013-07-22 16:15:43 +04:00
|
|
|
Document implements ParentNode;
|
2013-10-08 19:51:15 +04:00
|
|
|
Document implements OnErrorEventHandlerForNodes;
|
2014-09-24 17:11:29 +04:00
|
|
|
Document implements GeometryUtils;
|
2014-10-02 06:32:05 +04:00
|
|
|
Document implements FontFaceSource;
|