1// GENERATED CONTENT - DO NOT EDIT 2// Content was automatically extracted by Reffy into reffy-reports 3// (https://github.com/tidoust/reffy-reports) 4// Source: DOM Standard (https://dom.spec.whatwg.org/) 5 6[Exposed=(Window,Worker,AudioWorklet)] 7interface Event { 8 constructor(DOMString type, optional EventInit eventInitDict = {}); 9 10 readonly attribute DOMString type; 11 readonly attribute EventTarget? target; 12 readonly attribute EventTarget? srcElement; // historical 13 readonly attribute EventTarget? currentTarget; 14 sequence<EventTarget> composedPath(); 15 16 const unsigned short NONE = 0; 17 const unsigned short CAPTURING_PHASE = 1; 18 const unsigned short AT_TARGET = 2; 19 const unsigned short BUBBLING_PHASE = 3; 20 readonly attribute unsigned short eventPhase; 21 22 void stopPropagation(); 23 attribute boolean cancelBubble; // historical alias of .stopPropagation 24 void stopImmediatePropagation(); 25 26 readonly attribute boolean bubbles; 27 readonly attribute boolean cancelable; 28 attribute boolean returnValue; // historical 29 void preventDefault(); 30 readonly attribute boolean defaultPrevented; 31 readonly attribute boolean composed; 32 33 [LegacyUnforgeable] readonly attribute boolean isTrusted; 34 readonly attribute DOMHighResTimeStamp timeStamp; 35 36 void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical 37}; 38 39dictionary EventInit { 40 boolean bubbles = false; 41 boolean cancelable = false; 42 boolean composed = false; 43}; 44 45partial interface Window { 46 [Replaceable] readonly attribute any event; // historical 47}; 48 49[Exposed=(Window,Worker)] 50interface CustomEvent : Event { 51 constructor(DOMString type, optional CustomEventInit eventInitDict = {}); 52 53 readonly attribute any detail; 54 55 void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical 56}; 57 58dictionary CustomEventInit : EventInit { 59 any detail = null; 60}; 61 62[Exposed=(Window,Worker,AudioWorklet)] 63interface EventTarget { 64 constructor(); 65 66 void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {}); 67 void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {}); 68 boolean dispatchEvent(Event event); 69}; 70 71callback interface EventListener { 72 void handleEvent(Event event); 73}; 74 75dictionary EventListenerOptions { 76 boolean capture = false; 77}; 78 79dictionary AddEventListenerOptions : EventListenerOptions { 80 boolean passive = false; 81 boolean once = false; 82}; 83 84[Exposed=(Window,Worker)] 85interface AbortController { 86 constructor(); 87 88 [SameObject] readonly attribute AbortSignal signal; 89 90 void abort(); 91}; 92 93[Exposed=(Window,Worker)] 94interface AbortSignal : EventTarget { 95 readonly attribute boolean aborted; 96 97 attribute EventHandler onabort; 98}; 99interface mixin NonElementParentNode { 100 Element? getElementById(DOMString elementId); 101}; 102Document includes NonElementParentNode; 103DocumentFragment includes NonElementParentNode; 104 105interface mixin DocumentOrShadowRoot { 106}; 107Document includes DocumentOrShadowRoot; 108ShadowRoot includes DocumentOrShadowRoot; 109 110interface mixin ParentNode { 111 [SameObject] readonly attribute HTMLCollection children; 112 readonly attribute Element? firstElementChild; 113 readonly attribute Element? lastElementChild; 114 readonly attribute unsigned long childElementCount; 115 116 [CEReactions, Unscopable] void prepend((Node or DOMString)... nodes); 117 [CEReactions, Unscopable] void append((Node or DOMString)... nodes); 118 [CEReactions, Unscopable] void replaceChildren((Node or DOMString)... nodes); 119 120 Element? querySelector(DOMString selectors); 121 [NewObject] NodeList querySelectorAll(DOMString selectors); 122}; 123Document includes ParentNode; 124DocumentFragment includes ParentNode; 125Element includes ParentNode; 126 127interface mixin NonDocumentTypeChildNode { 128 readonly attribute Element? previousElementSibling; 129 readonly attribute Element? nextElementSibling; 130}; 131Element includes NonDocumentTypeChildNode; 132CharacterData includes NonDocumentTypeChildNode; 133 134interface mixin ChildNode { 135 [CEReactions, Unscopable] void before((Node or DOMString)... nodes); 136 [CEReactions, Unscopable] void after((Node or DOMString)... nodes); 137 [CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes); 138 [CEReactions, Unscopable] void remove(); 139}; 140DocumentType includes ChildNode; 141Element includes ChildNode; 142CharacterData includes ChildNode; 143 144interface mixin Slottable { 145 readonly attribute HTMLSlotElement? assignedSlot; 146}; 147Element includes Slottable; 148Text includes Slottable; 149 150[Exposed=Window] 151interface NodeList { 152 getter Node? item(unsigned long index); 153 readonly attribute unsigned long length; 154 iterable<Node>; 155}; 156 157[Exposed=Window, LegacyUnenumerableNamedProperties] 158interface HTMLCollection { 159 readonly attribute unsigned long length; 160 getter Element? item(unsigned long index); 161 getter Element? namedItem(DOMString name); 162}; 163 164[Exposed=Window] 165interface MutationObserver { 166 constructor(MutationCallback callback); 167 168 void observe(Node target, optional MutationObserverInit options = {}); 169 void disconnect(); 170 sequence<MutationRecord> takeRecords(); 171}; 172 173callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer); 174 175dictionary MutationObserverInit { 176 boolean childList = false; 177 boolean attributes; 178 boolean characterData; 179 boolean subtree = false; 180 boolean attributeOldValue; 181 boolean characterDataOldValue; 182 sequence<DOMString> attributeFilter; 183}; 184 185[Exposed=Window] 186interface MutationRecord { 187 readonly attribute DOMString type; 188 [SameObject] readonly attribute Node target; 189 [SameObject] readonly attribute NodeList addedNodes; 190 [SameObject] readonly attribute NodeList removedNodes; 191 readonly attribute Node? previousSibling; 192 readonly attribute Node? nextSibling; 193 readonly attribute DOMString? attributeName; 194 readonly attribute DOMString? attributeNamespace; 195 readonly attribute DOMString? oldValue; 196}; 197 198[Exposed=Window] 199interface Node : EventTarget { 200 const unsigned short ELEMENT_NODE = 1; 201 const unsigned short ATTRIBUTE_NODE = 2; 202 const unsigned short TEXT_NODE = 3; 203 const unsigned short CDATA_SECTION_NODE = 4; 204 const unsigned short ENTITY_REFERENCE_NODE = 5; // historical 205 const unsigned short ENTITY_NODE = 6; // historical 206 const unsigned short PROCESSING_INSTRUCTION_NODE = 7; 207 const unsigned short COMMENT_NODE = 8; 208 const unsigned short DOCUMENT_NODE = 9; 209 const unsigned short DOCUMENT_TYPE_NODE = 10; 210 const unsigned short DOCUMENT_FRAGMENT_NODE = 11; 211 const unsigned short NOTATION_NODE = 12; // historical 212 readonly attribute unsigned short nodeType; 213 readonly attribute DOMString nodeName; 214 215 readonly attribute USVString baseURI; 216 217 readonly attribute boolean isConnected; 218 readonly attribute Document? ownerDocument; 219 Node getRootNode(optional GetRootNodeOptions options = {}); 220 readonly attribute Node? parentNode; 221 readonly attribute Element? parentElement; 222 boolean hasChildNodes(); 223 [SameObject] readonly attribute NodeList childNodes; 224 readonly attribute Node? firstChild; 225 readonly attribute Node? lastChild; 226 readonly attribute Node? previousSibling; 227 readonly attribute Node? nextSibling; 228 229 [CEReactions] attribute DOMString? nodeValue; 230 [CEReactions] attribute DOMString? textContent; 231 [CEReactions] void normalize(); 232 233 [CEReactions, NewObject] Node cloneNode(optional boolean deep = false); 234 boolean isEqualNode(Node? otherNode); 235 boolean isSameNode(Node? otherNode); // historical alias of === 236 237 const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; 238 const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; 239 const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04; 240 const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08; 241 const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10; 242 const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; 243 unsigned short compareDocumentPosition(Node other); 244 boolean contains(Node? other); 245 246 DOMString? lookupPrefix(DOMString? namespace); 247 DOMString? lookupNamespaceURI(DOMString? prefix); 248 boolean isDefaultNamespace(DOMString? namespace); 249 250 [CEReactions] Node insertBefore(Node node, Node? child); 251 [CEReactions] Node appendChild(Node node); 252 [CEReactions] Node replaceChild(Node node, Node child); 253 [CEReactions] Node removeChild(Node child); 254}; 255 256dictionary GetRootNodeOptions { 257 boolean composed = false; 258}; 259 260[Exposed=Window] 261interface Document : Node { 262 constructor(); 263 264 [SameObject] readonly attribute DOMImplementation implementation; 265 readonly attribute USVString URL; 266 readonly attribute USVString documentURI; 267 readonly attribute DOMString compatMode; 268 readonly attribute DOMString characterSet; 269 readonly attribute DOMString charset; // historical alias of .characterSet 270 readonly attribute DOMString inputEncoding; // historical alias of .characterSet 271 readonly attribute DOMString contentType; 272 273 readonly attribute DocumentType? doctype; 274 readonly attribute Element? documentElement; 275 HTMLCollection getElementsByTagName(DOMString qualifiedName); 276 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); 277 HTMLCollection getElementsByClassName(DOMString classNames); 278 279 [CEReactions, NewObject] Element createElement(DOMString localName, optional (DOMString or ElementCreationOptions) options = {}); 280 [CEReactions, NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (DOMString or ElementCreationOptions) options = {}); 281 [NewObject] DocumentFragment createDocumentFragment(); 282 [NewObject] Text createTextNode(DOMString data); 283 [NewObject] CDATASection createCDATASection(DOMString data); 284 [NewObject] Comment createComment(DOMString data); 285 [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); 286 287 [CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false); 288 [CEReactions] Node adoptNode(Node node); 289 290 [NewObject] Attr createAttribute(DOMString localName); 291 [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName); 292 293 [NewObject] Event createEvent(DOMString interface); // historical 294 295 [NewObject] Range createRange(); 296 297 // NodeFilter.SHOW_ALL = 0xFFFFFFFF 298 [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); 299 [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); 300}; 301 302[Exposed=Window] 303interface XMLDocument : Document {}; 304 305dictionary ElementCreationOptions { 306 DOMString is; 307}; 308 309[Exposed=Window] 310interface DOMImplementation { 311 [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); 312 [NewObject] XMLDocument createDocument(DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null); 313 [NewObject] Document createHTMLDocument(optional DOMString title); 314 315 boolean hasFeature(); // useless; always returns true 316}; 317 318[Exposed=Window] 319interface DocumentType : Node { 320 readonly attribute DOMString name; 321 readonly attribute DOMString publicId; 322 readonly attribute DOMString systemId; 323}; 324 325[Exposed=Window] 326interface DocumentFragment : Node { 327 constructor(); 328}; 329 330[Exposed=Window] 331interface ShadowRoot : DocumentFragment { 332 readonly attribute ShadowRootMode mode; 333 readonly attribute Element host; 334 attribute EventHandler onslotchange; 335}; 336 337enum ShadowRootMode { "open", "closed" }; 338 339[Exposed=Window] 340interface Element : Node { 341 readonly attribute DOMString? namespaceURI; 342 readonly attribute DOMString? prefix; 343 readonly attribute DOMString localName; 344 readonly attribute DOMString tagName; 345 346 [CEReactions] attribute DOMString id; 347 [CEReactions] attribute DOMString className; 348 [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; 349 [CEReactions, Unscopable] attribute DOMString slot; 350 351 boolean hasAttributes(); 352 [SameObject] readonly attribute NamedNodeMap attributes; 353 sequence<DOMString> getAttributeNames(); 354 DOMString? getAttribute(DOMString qualifiedName); 355 DOMString? getAttributeNS(DOMString? namespace, DOMString localName); 356 [CEReactions] void setAttribute(DOMString qualifiedName, DOMString value); 357 [CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value); 358 [CEReactions] void removeAttribute(DOMString qualifiedName); 359 [CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName); 360 [CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force); 361 boolean hasAttribute(DOMString qualifiedName); 362 boolean hasAttributeNS(DOMString? namespace, DOMString localName); 363 364 Attr? getAttributeNode(DOMString qualifiedName); 365 Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName); 366 [CEReactions] Attr? setAttributeNode(Attr attr); 367 [CEReactions] Attr? setAttributeNodeNS(Attr attr); 368 [CEReactions] Attr removeAttributeNode(Attr attr); 369 370 ShadowRoot attachShadow(ShadowRootInit init); 371 readonly attribute ShadowRoot? shadowRoot; 372 373 Element? closest(DOMString selectors); 374 boolean matches(DOMString selectors); 375 boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches 376 377 HTMLCollection getElementsByTagName(DOMString qualifiedName); 378 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); 379 HTMLCollection getElementsByClassName(DOMString classNames); 380 381 [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical 382 void insertAdjacentText(DOMString where, DOMString data); // historical 383}; 384 385dictionary ShadowRootInit { 386 required ShadowRootMode mode; 387 boolean delegatesFocus = false; 388}; 389 390[Exposed=Window, 391 LegacyUnenumerableNamedProperties] 392interface NamedNodeMap { 393 readonly attribute unsigned long length; 394 getter Attr? item(unsigned long index); 395 getter Attr? getNamedItem(DOMString qualifiedName); 396 Attr? getNamedItemNS(DOMString? namespace, DOMString localName); 397 [CEReactions] Attr? setNamedItem(Attr attr); 398 [CEReactions] Attr? setNamedItemNS(Attr attr); 399 [CEReactions] Attr removeNamedItem(DOMString qualifiedName); 400 [CEReactions] Attr removeNamedItemNS(DOMString? namespace, DOMString localName); 401}; 402 403[Exposed=Window] 404interface Attr : Node { 405 readonly attribute DOMString? namespaceURI; 406 readonly attribute DOMString? prefix; 407 readonly attribute DOMString localName; 408 readonly attribute DOMString name; 409 [CEReactions] attribute DOMString value; 410 411 readonly attribute Element? ownerElement; 412 413 readonly attribute boolean specified; // useless; always returns true 414}; 415[Exposed=Window] 416interface CharacterData : Node { 417 attribute [LegacyNullToEmptyString] DOMString data; 418 readonly attribute unsigned long length; 419 DOMString substringData(unsigned long offset, unsigned long count); 420 void appendData(DOMString data); 421 void insertData(unsigned long offset, DOMString data); 422 void deleteData(unsigned long offset, unsigned long count); 423 void replaceData(unsigned long offset, unsigned long count, DOMString data); 424}; 425 426[Exposed=Window] 427interface Text : CharacterData { 428 constructor(optional DOMString data = ""); 429 430 [NewObject] Text splitText(unsigned long offset); 431 readonly attribute DOMString wholeText; 432}; 433 434[Exposed=Window] 435interface CDATASection : Text { 436}; 437[Exposed=Window] 438interface ProcessingInstruction : CharacterData { 439 readonly attribute DOMString target; 440}; 441[Exposed=Window] 442interface Comment : CharacterData { 443 constructor(optional DOMString data = ""); 444}; 445 446[Exposed=Window] 447interface AbstractRange { 448 readonly attribute Node startContainer; 449 readonly attribute unsigned long startOffset; 450 readonly attribute Node endContainer; 451 readonly attribute unsigned long endOffset; 452 readonly attribute boolean collapsed; 453}; 454 455dictionary StaticRangeInit { 456 required Node startContainer; 457 required unsigned long startOffset; 458 required Node endContainer; 459 required unsigned long endOffset; 460}; 461 462[Exposed=Window] 463interface StaticRange : AbstractRange { 464 constructor(StaticRangeInit init); 465}; 466 467[Exposed=Window] 468interface Range : AbstractRange { 469 constructor(); 470 471 readonly attribute Node commonAncestorContainer; 472 473 void setStart(Node node, unsigned long offset); 474 void setEnd(Node node, unsigned long offset); 475 void setStartBefore(Node node); 476 void setStartAfter(Node node); 477 void setEndBefore(Node node); 478 void setEndAfter(Node node); 479 void collapse(optional boolean toStart = false); 480 void selectNode(Node node); 481 void selectNodeContents(Node node); 482 483 const unsigned short START_TO_START = 0; 484 const unsigned short START_TO_END = 1; 485 const unsigned short END_TO_END = 2; 486 const unsigned short END_TO_START = 3; 487 short compareBoundaryPoints(unsigned short how, Range sourceRange); 488 489 [CEReactions] void deleteContents(); 490 [CEReactions, NewObject] DocumentFragment extractContents(); 491 [CEReactions, NewObject] DocumentFragment cloneContents(); 492 [CEReactions] void insertNode(Node node); 493 [CEReactions] void surroundContents(Node newParent); 494 495 [NewObject] Range cloneRange(); 496 void detach(); 497 498 boolean isPointInRange(Node node, unsigned long offset); 499 short comparePoint(Node node, unsigned long offset); 500 501 boolean intersectsNode(Node node); 502 503 stringifier; 504}; 505 506[Exposed=Window] 507interface NodeIterator { 508 [SameObject] readonly attribute Node root; 509 readonly attribute Node referenceNode; 510 readonly attribute boolean pointerBeforeReferenceNode; 511 readonly attribute unsigned long whatToShow; 512 readonly attribute NodeFilter? filter; 513 514 Node? nextNode(); 515 Node? previousNode(); 516 517 void detach(); 518}; 519 520[Exposed=Window] 521interface TreeWalker { 522 [SameObject] readonly attribute Node root; 523 readonly attribute unsigned long whatToShow; 524 readonly attribute NodeFilter? filter; 525 attribute Node currentNode; 526 527 Node? parentNode(); 528 Node? firstChild(); 529 Node? lastChild(); 530 Node? previousSibling(); 531 Node? nextSibling(); 532 Node? previousNode(); 533 Node? nextNode(); 534}; 535[Exposed=Window] 536callback interface NodeFilter { 537 // Constants for acceptNode() 538 const unsigned short FILTER_ACCEPT = 1; 539 const unsigned short FILTER_REJECT = 2; 540 const unsigned short FILTER_SKIP = 3; 541 542 // Constants for whatToShow 543 const unsigned long SHOW_ALL = 0xFFFFFFFF; 544 const unsigned long SHOW_ELEMENT = 0x1; 545 const unsigned long SHOW_ATTRIBUTE = 0x2; 546 const unsigned long SHOW_TEXT = 0x4; 547 const unsigned long SHOW_CDATA_SECTION = 0x8; 548 const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical 549 const unsigned long SHOW_ENTITY = 0x20; // historical 550 const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; 551 const unsigned long SHOW_COMMENT = 0x80; 552 const unsigned long SHOW_DOCUMENT = 0x100; 553 const unsigned long SHOW_DOCUMENT_TYPE = 0x200; 554 const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400; 555 const unsigned long SHOW_NOTATION = 0x800; // historical 556 557 unsigned short acceptNode(Node node); 558}; 559 560[Exposed=Window] 561interface DOMTokenList { 562 readonly attribute unsigned long length; 563 getter DOMString? item(unsigned long index); 564 boolean contains(DOMString token); 565 [CEReactions] void add(DOMString... tokens); 566 [CEReactions] void remove(DOMString... tokens); 567 [CEReactions] boolean toggle(DOMString token, optional boolean force); 568 [CEReactions] boolean replace(DOMString token, DOMString newToken); 569 boolean supports(DOMString token); 570 [CEReactions] stringifier attribute DOMString value; 571 iterable<DOMString>; 572}; 573 574[Exposed=Window] 575interface XPathResult { 576 const unsigned short ANY_TYPE = 0; 577 const unsigned short NUMBER_TYPE = 1; 578 const unsigned short STRING_TYPE = 2; 579 const unsigned short BOOLEAN_TYPE = 3; 580 const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4; 581 const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5; 582 const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6; 583 const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7; 584 const unsigned short ANY_UNORDERED_NODE_TYPE = 8; 585 const unsigned short FIRST_ORDERED_NODE_TYPE = 9; 586 587 readonly attribute unsigned short resultType; 588 readonly attribute unrestricted double numberValue; 589 readonly attribute DOMString stringValue; 590 readonly attribute boolean booleanValue; 591 readonly attribute Node? singleNodeValue; 592 readonly attribute boolean invalidIteratorState; 593 readonly attribute unsigned long snapshotLength; 594 595 Node? iterateNext(); 596 Node? snapshotItem(unsigned long index); 597}; 598 599[Exposed=Window] 600interface XPathExpression { 601 // XPathResult.ANY_TYPE = 0 602 XPathResult evaluate(Node contextNode, optional unsigned short type = 0, optional XPathResult? result = null); 603}; 604 605callback interface XPathNSResolver { 606 DOMString? lookupNamespaceURI(DOMString? prefix); 607}; 608 609interface mixin XPathEvaluatorBase { 610 [NewObject] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null); 611 XPathNSResolver createNSResolver(Node nodeResolver); 612 // XPathResult.ANY_TYPE = 0 613 XPathResult evaluate(DOMString expression, Node contextNode, optional XPathNSResolver? resolver = null, optional unsigned short type = 0, optional XPathResult? result = null); 614}; 615Document includes XPathEvaluatorBase; 616 617[Exposed=Window] 618interface XPathEvaluator { 619 constructor(); 620}; 621 622XPathEvaluator includes XPathEvaluatorBase; 623