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