2015-08-09 14:27:13 +03:00
|
|
|
// DOM web IDL
|
|
|
|
// Retrived from https://dom.spec.whatwg.org/
|
|
|
|
// Sat Jul 18 2015
|
|
|
|
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor(DOMString type, optional EventInit eventInitDict),
|
|
|
|
Exposed=(Window,Worker)]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Event {
|
|
|
|
readonly attribute DOMString type;
|
|
|
|
readonly attribute EventTarget? target;
|
|
|
|
readonly attribute EventTarget? currentTarget;
|
|
|
|
|
|
|
|
const unsigned short NONE = 0;
|
|
|
|
const unsigned short CAPTURING_PHASE = 1;
|
|
|
|
const unsigned short AT_TARGET = 2;
|
|
|
|
const unsigned short BUBBLING_PHASE = 3;
|
|
|
|
readonly attribute unsigned short eventPhase;
|
|
|
|
|
|
|
|
void stopPropagation();
|
|
|
|
void stopImmediatePropagation();
|
|
|
|
|
|
|
|
readonly attribute boolean bubbles;
|
|
|
|
readonly attribute boolean cancelable;
|
|
|
|
void preventDefault();
|
|
|
|
readonly attribute boolean defaultPrevented;
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Unforgeable] readonly attribute boolean isTrusted;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute DOMTimeStamp timeStamp;
|
|
|
|
|
|
|
|
void initEvent(DOMString type, boolean bubbles, boolean cancelable);
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary EventInit {
|
2015-08-09 14:27:13 +03:00
|
|
|
boolean bubbles = false;
|
|
|
|
boolean cancelable = false;
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor(DOMString type, optional CustomEventInit eventInitDict),
|
|
|
|
Exposed=(Window,Worker)]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface CustomEvent : Event {
|
|
|
|
readonly attribute any detail;
|
2015-08-09 14:27:13 +03:00
|
|
|
|
|
|
|
void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail);
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary CustomEventInit : EventInit {
|
2015-08-09 14:27:13 +03:00
|
|
|
any detail = null;
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=(Window,Worker)]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface EventTarget {
|
|
|
|
void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
|
|
|
|
void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
|
|
|
|
boolean dispatchEvent(Event event);
|
|
|
|
};
|
|
|
|
|
|
|
|
callback interface EventListener {
|
|
|
|
void handleEvent(Event event);
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=Window]
|
|
|
|
interface NonElementParentNode {
|
|
|
|
Element? getElementById(DOMString elementId);
|
|
|
|
};
|
|
|
|
Document implements NonElementParentNode;
|
|
|
|
DocumentFragment implements NonElementParentNode;
|
|
|
|
|
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=Window]
|
|
|
|
interface ParentNode {
|
|
|
|
[SameObject] readonly attribute HTMLCollection children;
|
|
|
|
readonly attribute Element? firstElementChild;
|
|
|
|
readonly attribute Element? lastElementChild;
|
|
|
|
readonly attribute unsigned long childElementCount;
|
|
|
|
|
|
|
|
[Unscopeable] void prepend((Node or DOMString)... nodes);
|
|
|
|
[Unscopeable] void append((Node or DOMString)... nodes);
|
|
|
|
|
|
|
|
[Unscopeable] Element? query(DOMString relativeSelectors);
|
|
|
|
[NewObject, Unscopeable] Elements queryAll(DOMString relativeSelectors);
|
|
|
|
Element? querySelector(DOMString selectors);
|
|
|
|
[NewObject] NodeList querySelectorAll(DOMString selectors);
|
|
|
|
};
|
|
|
|
Document implements ParentNode;
|
|
|
|
DocumentFragment implements ParentNode;
|
|
|
|
Element implements ParentNode;
|
|
|
|
|
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=Window]
|
|
|
|
interface NonDocumentTypeChildNode {
|
|
|
|
readonly attribute Element? previousElementSibling;
|
|
|
|
readonly attribute Element? nextElementSibling;
|
|
|
|
};
|
|
|
|
Element implements NonDocumentTypeChildNode;
|
|
|
|
CharacterData implements NonDocumentTypeChildNode;
|
|
|
|
|
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=Window]
|
|
|
|
interface ChildNode {
|
|
|
|
[Unscopeable] void before((Node or DOMString)... nodes);
|
|
|
|
[Unscopeable] void after((Node or DOMString)... nodes);
|
|
|
|
[Unscopeable] void replaceWith((Node or DOMString)... nodes);
|
|
|
|
[Unscopeable] void remove();
|
|
|
|
};
|
|
|
|
DocumentType implements ChildNode;
|
|
|
|
Element implements ChildNode;
|
|
|
|
CharacterData implements ChildNode;
|
|
|
|
|
|
|
|
//class Elements extends Array {
|
|
|
|
// Element? query(DOMString relativeSelectors);
|
|
|
|
// Elements queryAll(DOMString relativeSelectors);
|
|
|
|
//};
|
|
|
|
|
|
|
|
[Exposed=Window]
|
|
|
|
interface NodeList {
|
|
|
|
getter Node? item(unsigned long index);
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
iterable<Node>;
|
|
|
|
};
|
|
|
|
|
|
|
|
[Exposed=Window]
|
|
|
|
interface HTMLCollection {
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
getter Element? item(unsigned long index);
|
|
|
|
getter Element? namedItem(DOMString name);
|
|
|
|
};
|
|
|
|
|
2012-10-23 19:45:41 +04:00
|
|
|
[Constructor(MutationCallback callback)]
|
|
|
|
interface MutationObserver {
|
|
|
|
void observe(Node target, MutationObserverInit options);
|
|
|
|
void disconnect();
|
|
|
|
sequence<MutationRecord> takeRecords();
|
|
|
|
};
|
|
|
|
|
|
|
|
callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);
|
|
|
|
|
|
|
|
dictionary MutationObserverInit {
|
2015-08-09 14:27:13 +03:00
|
|
|
boolean childList = false;
|
2012-10-23 19:45:41 +04:00
|
|
|
boolean attributes;
|
|
|
|
boolean characterData;
|
2015-08-09 14:27:13 +03:00
|
|
|
boolean subtree = false;
|
2012-10-23 19:45:41 +04:00
|
|
|
boolean attributeOldValue;
|
|
|
|
boolean characterDataOldValue;
|
|
|
|
sequence<DOMString> attributeFilter;
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface MutationRecord {
|
|
|
|
readonly attribute DOMString type;
|
|
|
|
readonly attribute Node target;
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute NodeList addedNodes;
|
|
|
|
[SameObject] readonly attribute NodeList removedNodes;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute Node? previousSibling;
|
|
|
|
readonly attribute Node? nextSibling;
|
|
|
|
readonly attribute DOMString? attributeName;
|
|
|
|
readonly attribute DOMString? attributeNamespace;
|
|
|
|
readonly attribute DOMString? oldValue;
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Node : EventTarget {
|
|
|
|
const unsigned short ELEMENT_NODE = 1;
|
|
|
|
const unsigned short ATTRIBUTE_NODE = 2; // historical
|
|
|
|
const unsigned short TEXT_NODE = 3;
|
|
|
|
const unsigned short CDATA_SECTION_NODE = 4; // historical
|
|
|
|
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
|
|
|
|
const unsigned short ENTITY_NODE = 6; // historical
|
|
|
|
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
|
|
|
|
const unsigned short COMMENT_NODE = 8;
|
|
|
|
const unsigned short DOCUMENT_NODE = 9;
|
|
|
|
const unsigned short DOCUMENT_TYPE_NODE = 10;
|
|
|
|
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
|
|
|
|
const unsigned short NOTATION_NODE = 12; // historical
|
|
|
|
readonly attribute unsigned short nodeType;
|
|
|
|
readonly attribute DOMString nodeName;
|
|
|
|
|
|
|
|
readonly attribute DOMString? baseURI;
|
|
|
|
|
|
|
|
readonly attribute Document? ownerDocument;
|
|
|
|
readonly attribute Node? parentNode;
|
|
|
|
readonly attribute Element? parentElement;
|
|
|
|
boolean hasChildNodes();
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute NodeList childNodes;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute Node? firstChild;
|
|
|
|
readonly attribute Node? lastChild;
|
|
|
|
readonly attribute Node? previousSibling;
|
|
|
|
readonly attribute Node? nextSibling;
|
|
|
|
|
|
|
|
attribute DOMString? nodeValue;
|
|
|
|
attribute DOMString? textContent;
|
|
|
|
void normalize();
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Node cloneNode(optional boolean deep = false);
|
|
|
|
boolean isEqualNode(Node? otherNode);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
|
|
|
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
|
|
|
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
|
|
|
|
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
|
|
|
|
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
|
|
|
|
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
2015-08-09 14:27:13 +03:00
|
|
|
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
2012-10-23 19:45:41 +04:00
|
|
|
unsigned short compareDocumentPosition(Node other);
|
|
|
|
boolean contains(Node? other);
|
|
|
|
|
|
|
|
DOMString? lookupPrefix(DOMString? namespace);
|
|
|
|
DOMString? lookupNamespaceURI(DOMString? prefix);
|
|
|
|
boolean isDefaultNamespace(DOMString? namespace);
|
2015-08-09 14:27:13 +03:00
|
|
|
|
|
|
|
Node insertBefore(Node node, Node? child);
|
|
|
|
Node appendChild(Node node);
|
|
|
|
Node replaceChild(Node node, Node child);
|
|
|
|
Node removeChild(Node child);
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor,
|
|
|
|
Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Document : Node {
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute DOMImplementation implementation;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute DOMString URL;
|
|
|
|
readonly attribute DOMString documentURI;
|
2015-08-09 14:27:13 +03:00
|
|
|
readonly attribute DOMString origin;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute DOMString compatMode;
|
|
|
|
readonly attribute DOMString characterSet;
|
2015-08-09 14:27:13 +03:00
|
|
|
readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute DOMString contentType;
|
|
|
|
|
|
|
|
readonly attribute DocumentType? doctype;
|
|
|
|
readonly attribute Element? documentElement;
|
|
|
|
HTMLCollection getElementsByTagName(DOMString localName);
|
|
|
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
|
|
|
HTMLCollection getElementsByClassName(DOMString classNames);
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Element createElement(DOMString localName);
|
|
|
|
[NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
|
|
|
[NewObject] DocumentFragment createDocumentFragment();
|
|
|
|
[NewObject] Text createTextNode(DOMString data);
|
|
|
|
[NewObject] Comment createComment(DOMString data);
|
|
|
|
[NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Node importNode(Node node, optional boolean deep = false);
|
2012-10-23 19:45:41 +04:00
|
|
|
Node adoptNode(Node node);
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Attr createAttribute(DOMString localName);
|
|
|
|
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString name);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Event createEvent(DOMString interface);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Range createRange();
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
|
|
|
[NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
|
|
|
[NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface XMLDocument : Document {};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface DOMImplementation {
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
|
|
|
|
[NewObject] XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
|
|
|
|
[NewObject] Document createHTMLDocument(optional DOMString title);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
boolean hasFeature(); // useless; always returns true
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor,
|
|
|
|
Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface DocumentFragment : Node {
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface DocumentType : Node {
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
readonly attribute DOMString publicId;
|
|
|
|
readonly attribute DOMString systemId;
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Element : Node {
|
|
|
|
readonly attribute DOMString? namespaceURI;
|
|
|
|
readonly attribute DOMString? prefix;
|
|
|
|
readonly attribute DOMString localName;
|
|
|
|
readonly attribute DOMString tagName;
|
|
|
|
|
|
|
|
attribute DOMString id;
|
|
|
|
attribute DOMString className;
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute DOMTokenList classList;
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
boolean hasAttributes();
|
|
|
|
[SameObject] readonly attribute NamedNodeMap attributes;
|
2012-10-23 19:45:41 +04:00
|
|
|
DOMString? getAttribute(DOMString name);
|
|
|
|
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
|
|
|
|
void setAttribute(DOMString name, DOMString value);
|
|
|
|
void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
|
|
|
|
void removeAttribute(DOMString name);
|
|
|
|
void removeAttributeNS(DOMString? namespace, DOMString localName);
|
|
|
|
boolean hasAttribute(DOMString name);
|
|
|
|
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
Attr? getAttributeNode(DOMString name);
|
|
|
|
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
|
|
|
|
Attr? setAttributeNode(Attr attr);
|
|
|
|
Attr? setAttributeNodeNS(Attr attr);
|
|
|
|
Attr removeAttributeNode(Attr attr);
|
|
|
|
|
|
|
|
Element? closest(DOMString selectors);
|
|
|
|
boolean matches(DOMString selectors);
|
|
|
|
|
2012-10-23 19:45:41 +04:00
|
|
|
HTMLCollection getElementsByTagName(DOMString localName);
|
|
|
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
|
|
|
HTMLCollection getElementsByClassName(DOMString classNames);
|
2015-08-09 14:27:13 +03:00
|
|
|
};
|
|
|
|
[Exposed=Window]
|
|
|
|
interface NamedNodeMap {
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
getter Attr? item(unsigned long index);
|
|
|
|
getter Attr? getNamedItem(DOMString name);
|
|
|
|
Attr? getNamedItemNS(DOMString? namespace, DOMString localName);
|
|
|
|
Attr? setNamedItem(Attr attr);
|
|
|
|
Attr? setNamedItemNS(Attr attr);
|
|
|
|
Attr removeNamedItem(DOMString name);
|
|
|
|
Attr removeNamedItemNS(DOMString? namespace, DOMString localName);
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Attr {
|
|
|
|
readonly attribute DOMString? namespaceURI;
|
|
|
|
readonly attribute DOMString? prefix;
|
|
|
|
readonly attribute DOMString localName;
|
2015-08-09 14:27:13 +03:00
|
|
|
readonly attribute DOMString name;
|
|
|
|
attribute DOMString value;
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString nodeValue; // legacy alias of .value
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString textContent; // legacy alias of .value
|
|
|
|
|
|
|
|
readonly attribute Element? ownerElement;
|
2012-10-23 19:45:41 +04:00
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
readonly attribute boolean specified; // useless; always returns true
|
|
|
|
};
|
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface CharacterData : Node {
|
|
|
|
[TreatNullAs=EmptyString] attribute DOMString data;
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
DOMString substringData(unsigned long offset, unsigned long count);
|
|
|
|
void appendData(DOMString data);
|
|
|
|
void insertData(unsigned long offset, DOMString data);
|
|
|
|
void deleteData(unsigned long offset, unsigned long count);
|
|
|
|
void replaceData(unsigned long offset, unsigned long count, DOMString data);
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor(optional DOMString data = ""),
|
|
|
|
Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Text : CharacterData {
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Text splitText(unsigned long offset);
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute DOMString wholeText;
|
|
|
|
};
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface ProcessingInstruction : CharacterData {
|
|
|
|
readonly attribute DOMString target;
|
|
|
|
};
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor(optional DOMString data = ""),
|
|
|
|
Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Comment : CharacterData {
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Constructor,
|
|
|
|
Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface Range {
|
|
|
|
readonly attribute Node startContainer;
|
|
|
|
readonly attribute unsigned long startOffset;
|
|
|
|
readonly attribute Node endContainer;
|
|
|
|
readonly attribute unsigned long endOffset;
|
|
|
|
readonly attribute boolean collapsed;
|
|
|
|
readonly attribute Node commonAncestorContainer;
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
void setStart(Node node, unsigned long offset);
|
|
|
|
void setEnd(Node node, unsigned long offset);
|
|
|
|
void setStartBefore(Node node);
|
|
|
|
void setStartAfter(Node node);
|
|
|
|
void setEndBefore(Node node);
|
|
|
|
void setEndAfter(Node node);
|
|
|
|
void collapse(optional boolean toStart = false);
|
|
|
|
void selectNode(Node node);
|
|
|
|
void selectNodeContents(Node node);
|
2012-10-23 19:45:41 +04:00
|
|
|
|
|
|
|
const unsigned short START_TO_START = 0;
|
|
|
|
const unsigned short START_TO_END = 1;
|
|
|
|
const unsigned short END_TO_END = 2;
|
|
|
|
const unsigned short END_TO_START = 3;
|
|
|
|
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
|
|
|
|
|
|
|
void deleteContents();
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] DocumentFragment extractContents();
|
|
|
|
[NewObject] DocumentFragment cloneContents();
|
2012-10-23 19:45:41 +04:00
|
|
|
void insertNode(Node node);
|
|
|
|
void surroundContents(Node newParent);
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[NewObject] Range cloneRange();
|
2012-10-23 19:45:41 +04:00
|
|
|
void detach();
|
|
|
|
|
|
|
|
boolean isPointInRange(Node node, unsigned long offset);
|
|
|
|
short comparePoint(Node node, unsigned long offset);
|
|
|
|
|
|
|
|
boolean intersectsNode(Node node);
|
|
|
|
|
|
|
|
stringifier;
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface NodeIterator {
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute Node root;
|
|
|
|
readonly attribute Node referenceNode;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute boolean pointerBeforeReferenceNode;
|
|
|
|
readonly attribute unsigned long whatToShow;
|
|
|
|
readonly attribute NodeFilter? filter;
|
|
|
|
|
|
|
|
Node? nextNode();
|
|
|
|
Node? previousNode();
|
|
|
|
|
|
|
|
void detach();
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
interface TreeWalker {
|
2015-08-09 14:27:13 +03:00
|
|
|
[SameObject] readonly attribute Node root;
|
2012-10-23 19:45:41 +04:00
|
|
|
readonly attribute unsigned long whatToShow;
|
|
|
|
readonly attribute NodeFilter? filter;
|
|
|
|
attribute Node currentNode;
|
|
|
|
|
|
|
|
Node? parentNode();
|
|
|
|
Node? firstChild();
|
|
|
|
Node? lastChild();
|
|
|
|
Node? previousSibling();
|
|
|
|
Node? nextSibling();
|
|
|
|
Node? previousNode();
|
|
|
|
Node? nextNode();
|
|
|
|
};
|
2015-08-09 14:27:13 +03:00
|
|
|
[Exposed=Window]
|
2012-10-23 19:45:41 +04:00
|
|
|
callback interface NodeFilter {
|
|
|
|
// Constants for acceptNode()
|
|
|
|
const unsigned short FILTER_ACCEPT = 1;
|
|
|
|
const unsigned short FILTER_REJECT = 2;
|
|
|
|
const unsigned short FILTER_SKIP = 3;
|
|
|
|
|
|
|
|
// Constants for whatToShow
|
|
|
|
const unsigned long SHOW_ALL = 0xFFFFFFFF;
|
|
|
|
const unsigned long SHOW_ELEMENT = 0x1;
|
|
|
|
const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
|
|
|
|
const unsigned long SHOW_TEXT = 0x4;
|
|
|
|
const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
|
|
|
|
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
|
|
|
|
const unsigned long SHOW_ENTITY = 0x20; // historical
|
|
|
|
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
|
|
|
|
const unsigned long SHOW_COMMENT = 0x80;
|
|
|
|
const unsigned long SHOW_DOCUMENT = 0x100;
|
|
|
|
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
|
|
|
|
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
|
|
|
|
const unsigned long SHOW_NOTATION = 0x800; // historical
|
|
|
|
|
|
|
|
unsigned short acceptNode(Node node);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface DOMTokenList {
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
getter DOMString? item(unsigned long index);
|
|
|
|
boolean contains(DOMString token);
|
|
|
|
void add(DOMString... tokens);
|
|
|
|
void remove(DOMString... tokens);
|
|
|
|
boolean toggle(DOMString token, optional boolean force);
|
|
|
|
stringifier;
|
2015-08-09 14:27:13 +03:00
|
|
|
iterable<DOMString>;
|
2012-10-23 19:45:41 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface DOMSettableTokenList : DOMTokenList {
|
|
|
|
attribute DOMString value;
|
|
|
|
};
|
|
|
|
|
2015-08-09 14:27:13 +03:00
|
|
|
|