html.idl (103907B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: HTML Standard (https://html.spec.whatwg.org/multipage/) 5 6 [Exposed=Window, 7 LegacyUnenumerableNamedProperties] 8 interface HTMLAllCollection { 9 readonly attribute unsigned long length; 10 getter Element (unsigned long index); 11 getter (HTMLCollection or Element)? namedItem(DOMString name); 12 (HTMLCollection or Element)? item(optional DOMString nameOrIndex); 13 14 // Note: HTMLAllCollection objects have a custom [[Call]] internal method and an [[IsHTMLDDA]] internal slot. 15 }; 16 17 [Exposed=Window] 18 interface HTMLFormControlsCollection : HTMLCollection { 19 // inherits length and item() 20 getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() 21 }; 22 23 [Exposed=Window] 24 interface RadioNodeList : NodeList { 25 attribute DOMString value; 26 }; 27 28 [Exposed=Window] 29 interface HTMLOptionsCollection : HTMLCollection { 30 // inherits item(), namedItem() 31 [CEReactions] attribute unsigned long length; // shadows inherited length 32 [CEReactions] setter undefined (unsigned long index, HTMLOptionElement? option); 33 [CEReactions] undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); 34 [CEReactions] undefined remove(long index); 35 attribute long selectedIndex; 36 }; 37 38 [Exposed=(Window,Worker)] 39 interface DOMStringList { 40 readonly attribute unsigned long length; 41 getter DOMString? item(unsigned long index); 42 boolean contains(DOMString string); 43 }; 44 45 enum DocumentReadyState { "loading", "interactive", "complete" }; 46 enum DocumentVisibilityState { "visible", "hidden" }; 47 typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; 48 49 [LegacyOverrideBuiltIns] 50 partial interface Document { 51 static Document parseHTMLUnsafe((TrustedHTML or DOMString) html); 52 53 // resource metadata management 54 [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location; 55 attribute USVString domain; 56 readonly attribute USVString referrer; 57 attribute USVString cookie; 58 readonly attribute DOMString lastModified; 59 readonly attribute DocumentReadyState readyState; 60 61 // DOM tree accessors 62 getter object (DOMString name); 63 [CEReactions] attribute DOMString title; 64 [CEReactions] attribute DOMString dir; 65 [CEReactions] attribute HTMLElement? body; 66 readonly attribute HTMLHeadElement? head; 67 [SameObject] readonly attribute HTMLCollection images; 68 [SameObject] readonly attribute HTMLCollection embeds; 69 [SameObject] readonly attribute HTMLCollection plugins; 70 [SameObject] readonly attribute HTMLCollection links; 71 [SameObject] readonly attribute HTMLCollection forms; 72 [SameObject] readonly attribute HTMLCollection scripts; 73 NodeList getElementsByName(DOMString elementName); 74 readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only 75 76 // dynamic markup insertion 77 [CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored 78 WindowProxy? open(USVString url, DOMString name, DOMString features); 79 [CEReactions] undefined close(); 80 [CEReactions] undefined write((TrustedHTML or DOMString)... text); 81 [CEReactions] undefined writeln((TrustedHTML or DOMString)... text); 82 83 // user interaction 84 readonly attribute WindowProxy? defaultView; 85 boolean hasFocus(); 86 [CEReactions] attribute DOMString designMode; 87 [CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); 88 boolean queryCommandEnabled(DOMString commandId); 89 boolean queryCommandIndeterm(DOMString commandId); 90 boolean queryCommandState(DOMString commandId); 91 boolean queryCommandSupported(DOMString commandId); 92 DOMString queryCommandValue(DOMString commandId); 93 readonly attribute boolean hidden; 94 readonly attribute DocumentVisibilityState visibilityState; 95 96 // special event handler IDL attributes that only apply to Document objects 97 [LegacyLenientThis] attribute EventHandler onreadystatechange; 98 attribute EventHandler onvisibilitychange; 99 100 // also has obsolete members 101 }; 102 Document includes GlobalEventHandlers; 103 104 partial interface mixin DocumentOrShadowRoot { 105 readonly attribute Element? activeElement; 106 }; 107 108 [Exposed=Window] 109 interface HTMLElement : Element { 110 [HTMLConstructor] constructor(); 111 112 // metadata attributes 113 [CEReactions, Reflect] attribute DOMString title; 114 [CEReactions, Reflect] attribute DOMString lang; 115 [CEReactions] attribute boolean translate; 116 [CEReactions] attribute DOMString dir; 117 118 // user interaction 119 [CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden; 120 [CEReactions, Reflect] attribute boolean inert; 121 undefined click(); 122 [CEReactions, Reflect] attribute DOMString accessKey; 123 readonly attribute DOMString accessKeyLabel; 124 [CEReactions] attribute boolean draggable; 125 [CEReactions] attribute boolean spellcheck; 126 [CEReactions, ReflectSetter] attribute DOMString writingSuggestions; 127 [CEReactions, ReflectSetter] attribute DOMString autocapitalize; 128 [CEReactions] attribute boolean autocorrect; 129 130 [CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText; 131 [CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText; 132 133 ElementInternals attachInternals(); 134 135 // The popover API 136 undefined showPopover(optional ShowPopoverOptions options = {}); 137 undefined hidePopover(); 138 boolean togglePopover(optional (TogglePopoverOptions or boolean) options = {}); 139 [CEReactions] attribute DOMString? popover; 140 141 [CEReactions, Reflect, ReflectRange=(0, 8)] attribute unsigned long headingOffset; 142 [CEReactions, Reflect] attribute boolean headingReset; 143 }; 144 145 dictionary ShowPopoverOptions { 146 HTMLElement source; 147 }; 148 149 dictionary TogglePopoverOptions : ShowPopoverOptions { 150 boolean force; 151 }; 152 153 HTMLElement includes GlobalEventHandlers; 154 HTMLElement includes ElementContentEditable; 155 HTMLElement includes HTMLOrSVGElement; 156 157 [Exposed=Window] 158 interface HTMLUnknownElement : HTMLElement { 159 // Note: intentionally no [HTMLConstructor] 160 }; 161 162 interface mixin HTMLOrSVGElement { 163 [SameObject] readonly attribute DOMStringMap dataset; 164 attribute DOMString nonce; // intentionally no [CEReactions] 165 166 [CEReactions, Reflect] attribute boolean autofocus; 167 [CEReactions, ReflectSetter] attribute long tabIndex; 168 undefined focus(optional FocusOptions options = {}); 169 undefined blur(); 170 }; 171 172 [Exposed=Window, 173 LegacyOverrideBuiltIns] 174 interface DOMStringMap { 175 getter DOMString (DOMString name); 176 [CEReactions] setter undefined (DOMString name, DOMString value); 177 [CEReactions] deleter undefined (DOMString name); 178 }; 179 180 [Exposed=Window] 181 interface HTMLHtmlElement : HTMLElement { 182 [HTMLConstructor] constructor(); 183 184 // also has obsolete members 185 }; 186 187 [Exposed=Window] 188 interface HTMLHeadElement : HTMLElement { 189 [HTMLConstructor] constructor(); 190 }; 191 192 [Exposed=Window] 193 interface HTMLTitleElement : HTMLElement { 194 [HTMLConstructor] constructor(); 195 196 [CEReactions] attribute DOMString text; 197 }; 198 199 [Exposed=Window] 200 interface HTMLBaseElement : HTMLElement { 201 [HTMLConstructor] constructor(); 202 203 [CEReactions, ReflectSetter] attribute USVString href; 204 [CEReactions, Reflect] attribute DOMString target; 205 }; 206 207 [Exposed=Window] 208 interface HTMLLinkElement : HTMLElement { 209 [HTMLConstructor] constructor(); 210 211 [CEReactions, ReflectURL] attribute USVString href; 212 [CEReactions] attribute DOMString? crossOrigin; 213 [CEReactions, Reflect] attribute DOMString rel; 214 [CEReactions] attribute DOMString as; 215 [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList; 216 [CEReactions, Reflect] attribute DOMString media; 217 [CEReactions, Reflect] attribute DOMString integrity; 218 [CEReactions, Reflect] attribute DOMString hreflang; 219 [CEReactions, Reflect] attribute DOMString type; 220 [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList sizes; 221 [CEReactions, Reflect] attribute USVString imageSrcset; 222 [CEReactions, Reflect] attribute DOMString imageSizes; 223 [CEReactions] attribute DOMString referrerPolicy; 224 [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList blocking; 225 [CEReactions, Reflect] attribute boolean disabled; 226 [CEReactions] attribute DOMString fetchPriority; 227 228 // also has obsolete members 229 }; 230 HTMLLinkElement includes LinkStyle; 231 232 [Exposed=Window] 233 interface HTMLMetaElement : HTMLElement { 234 [HTMLConstructor] constructor(); 235 236 [CEReactions, Reflect] attribute DOMString name; 237 [CEReactions, Reflect="http-equiv"] attribute DOMString httpEquiv; 238 [CEReactions, Reflect] attribute DOMString content; 239 [CEReactions, Reflect] attribute DOMString media; 240 241 // also has obsolete members 242 }; 243 244 [Exposed=Window] 245 interface HTMLStyleElement : HTMLElement { 246 [HTMLConstructor] constructor(); 247 248 attribute boolean disabled; 249 [CEReactions, Reflect] attribute DOMString media; 250 [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList blocking; 251 252 // also has obsolete members 253 }; 254 HTMLStyleElement includes LinkStyle; 255 256 [Exposed=Window] 257 interface HTMLBodyElement : HTMLElement { 258 [HTMLConstructor] constructor(); 259 260 // also has obsolete members 261 }; 262 263 HTMLBodyElement includes WindowEventHandlers; 264 265 [Exposed=Window] 266 interface HTMLHeadingElement : HTMLElement { 267 [HTMLConstructor] constructor(); 268 269 // also has obsolete members 270 }; 271 272 [Exposed=Window] 273 interface HTMLParagraphElement : HTMLElement { 274 [HTMLConstructor] constructor(); 275 276 // also has obsolete members 277 }; 278 279 [Exposed=Window] 280 interface HTMLHRElement : HTMLElement { 281 [HTMLConstructor] constructor(); 282 283 // also has obsolete members 284 }; 285 286 [Exposed=Window] 287 interface HTMLPreElement : HTMLElement { 288 [HTMLConstructor] constructor(); 289 290 // also has obsolete members 291 }; 292 293 [Exposed=Window] 294 interface HTMLQuoteElement : HTMLElement { 295 [HTMLConstructor] constructor(); 296 297 [CEReactions, ReflectURL] attribute USVString cite; 298 }; 299 300 [Exposed=Window] 301 interface HTMLOListElement : HTMLElement { 302 [HTMLConstructor] constructor(); 303 304 [CEReactions, Reflect] attribute boolean reversed; 305 [CEReactions, Reflect, ReflectDefault=1] attribute long start; 306 [CEReactions, Reflect] attribute DOMString type; 307 308 // also has obsolete members 309 }; 310 311 [Exposed=Window] 312 interface HTMLUListElement : HTMLElement { 313 [HTMLConstructor] constructor(); 314 315 // also has obsolete members 316 }; 317 318 [Exposed=Window] 319 interface HTMLMenuElement : HTMLElement { 320 [HTMLConstructor] constructor(); 321 322 // also has obsolete members 323 }; 324 325 [Exposed=Window] 326 interface HTMLLIElement : HTMLElement { 327 [HTMLConstructor] constructor(); 328 329 [CEReactions, Reflect] attribute long value; 330 331 // also has obsolete members 332 }; 333 334 [Exposed=Window] 335 interface HTMLDListElement : HTMLElement { 336 [HTMLConstructor] constructor(); 337 338 // also has obsolete members 339 }; 340 341 [Exposed=Window] 342 interface HTMLDivElement : HTMLElement { 343 [HTMLConstructor] constructor(); 344 345 // also has obsolete members 346 }; 347 348 [Exposed=Window] 349 interface HTMLAnchorElement : HTMLElement { 350 [HTMLConstructor] constructor(); 351 352 [CEReactions, Reflect] attribute DOMString target; 353 [CEReactions, Reflect] attribute DOMString download; 354 [CEReactions, Reflect] attribute USVString ping; 355 [CEReactions, Reflect] attribute DOMString rel; 356 [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList; 357 [CEReactions, Reflect] attribute DOMString hreflang; 358 [CEReactions, Reflect] attribute DOMString type; 359 360 [CEReactions] attribute DOMString text; 361 362 [CEReactions] attribute DOMString referrerPolicy; 363 364 // also has obsolete members 365 }; 366 HTMLAnchorElement includes HTMLHyperlinkElementUtils; 367 368 [Exposed=Window] 369 interface HTMLDataElement : HTMLElement { 370 [HTMLConstructor] constructor(); 371 372 [CEReactions, Reflect] attribute DOMString value; 373 }; 374 375 [Exposed=Window] 376 interface HTMLTimeElement : HTMLElement { 377 [HTMLConstructor] constructor(); 378 379 [CEReactions, Reflect] attribute DOMString dateTime; 380 }; 381 382 [Exposed=Window] 383 interface HTMLSpanElement : HTMLElement { 384 [HTMLConstructor] constructor(); 385 }; 386 387 [Exposed=Window] 388 interface HTMLBRElement : HTMLElement { 389 [HTMLConstructor] constructor(); 390 391 // also has obsolete members 392 }; 393 394 interface mixin HTMLHyperlinkElementUtils { 395 [CEReactions, ReflectSetter] stringifier attribute USVString href; 396 readonly attribute USVString origin; 397 [CEReactions] attribute USVString protocol; 398 [CEReactions] attribute USVString username; 399 [CEReactions] attribute USVString password; 400 [CEReactions] attribute USVString host; 401 [CEReactions] attribute USVString hostname; 402 [CEReactions] attribute USVString port; 403 [CEReactions] attribute USVString pathname; 404 [CEReactions] attribute USVString search; 405 [CEReactions] attribute USVString hash; 406 }; 407 408 [Exposed=Window] 409 interface HTMLModElement : HTMLElement { 410 [HTMLConstructor] constructor(); 411 412 [CEReactions, ReflectURL] attribute USVString cite; 413 [CEReactions, Reflect] attribute DOMString dateTime; 414 }; 415 416 [Exposed=Window] 417 interface HTMLPictureElement : HTMLElement { 418 [HTMLConstructor] constructor(); 419 }; 420 421 [Exposed=Window] 422 interface HTMLSourceElement : HTMLElement { 423 [HTMLConstructor] constructor(); 424 425 [CEReactions, ReflectURL] attribute USVString src; 426 [CEReactions, Reflect] attribute DOMString type; 427 [CEReactions, Reflect] attribute USVString srcset; 428 [CEReactions, Reflect] attribute DOMString sizes; 429 [CEReactions, Reflect] attribute DOMString media; 430 [CEReactions, Reflect] attribute unsigned long width; 431 [CEReactions, Reflect] attribute unsigned long height; 432 }; 433 434 [Exposed=Window, 435 LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)] 436 interface HTMLImageElement : HTMLElement { 437 [HTMLConstructor] constructor(); 438 439 [CEReactions, Reflect] attribute DOMString alt; 440 [CEReactions, ReflectURL] attribute USVString src; 441 [CEReactions, Reflect] attribute USVString srcset; 442 [CEReactions, Reflect] attribute DOMString sizes; 443 [CEReactions] attribute DOMString? crossOrigin; 444 [CEReactions, Reflect] attribute DOMString useMap; 445 [CEReactions, Reflect] attribute boolean isMap; 446 [CEReactions, ReflectSetter] attribute unsigned long width; 447 [CEReactions, ReflectSetter] attribute unsigned long height; 448 readonly attribute unsigned long naturalWidth; 449 readonly attribute unsigned long naturalHeight; 450 readonly attribute boolean complete; 451 readonly attribute USVString currentSrc; 452 [CEReactions] attribute DOMString referrerPolicy; 453 [CEReactions] attribute DOMString decoding; 454 [CEReactions] attribute DOMString loading; 455 [CEReactions] attribute DOMString fetchPriority; 456 457 Promise<undefined> decode(); 458 459 // also has obsolete members 460 }; 461 462 [Exposed=Window] 463 interface HTMLIFrameElement : HTMLElement { 464 [HTMLConstructor] constructor(); 465 466 [CEReactions, ReflectURL] attribute USVString src; 467 [CEReactions] attribute (TrustedHTML or DOMString) srcdoc; 468 [CEReactions, Reflect] attribute DOMString name; 469 [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList sandbox; 470 [CEReactions, Reflect] attribute DOMString allow; 471 [CEReactions, Reflect] attribute boolean allowFullscreen; 472 [CEReactions, Reflect] attribute DOMString width; 473 [CEReactions, Reflect] attribute DOMString height; 474 [CEReactions] attribute DOMString referrerPolicy; 475 [CEReactions] attribute DOMString loading; 476 readonly attribute Document? contentDocument; 477 readonly attribute WindowProxy? contentWindow; 478 Document? getSVGDocument(); 479 480 // also has obsolete members 481 }; 482 483 [Exposed=Window] 484 interface HTMLEmbedElement : HTMLElement { 485 [HTMLConstructor] constructor(); 486 487 [CEReactions, ReflectURL] attribute USVString src; 488 [CEReactions, Reflect] attribute DOMString type; 489 [CEReactions, Reflect] attribute DOMString width; 490 [CEReactions, Reflect] attribute DOMString height; 491 Document? getSVGDocument(); 492 493 // also has obsolete members 494 }; 495 496 [Exposed=Window] 497 interface HTMLObjectElement : HTMLElement { 498 [HTMLConstructor] constructor(); 499 500 [CEReactions, ReflectURL] attribute USVString data; 501 [CEReactions, Reflect] attribute DOMString type; 502 [CEReactions, Reflect] attribute DOMString name; 503 readonly attribute HTMLFormElement? form; 504 [CEReactions, Reflect] attribute DOMString width; 505 [CEReactions, Reflect] attribute DOMString height; 506 readonly attribute Document? contentDocument; 507 readonly attribute WindowProxy? contentWindow; 508 Document? getSVGDocument(); 509 510 readonly attribute boolean willValidate; 511 readonly attribute ValidityState validity; 512 readonly attribute DOMString validationMessage; 513 boolean checkValidity(); 514 boolean reportValidity(); 515 undefined setCustomValidity(DOMString error); 516 517 // also has obsolete members 518 }; 519 520 [Exposed=Window] 521 interface HTMLVideoElement : HTMLMediaElement { 522 [HTMLConstructor] constructor(); 523 524 [CEReactions, Reflect] attribute unsigned long width; 525 [CEReactions, Reflect] attribute unsigned long height; 526 readonly attribute unsigned long videoWidth; 527 readonly attribute unsigned long videoHeight; 528 [CEReactions, ReflectURL] attribute USVString poster; 529 [CEReactions, Reflect] attribute boolean playsInline; 530 }; 531 532 [Exposed=Window, 533 LegacyFactoryFunction=Audio(optional DOMString src)] 534 interface HTMLAudioElement : HTMLMediaElement { 535 [HTMLConstructor] constructor(); 536 }; 537 538 [Exposed=Window] 539 interface HTMLTrackElement : HTMLElement { 540 [HTMLConstructor] constructor(); 541 542 [CEReactions] attribute DOMString kind; 543 [CEReactions, ReflectURL] attribute USVString src; 544 [CEReactions, Reflect] attribute DOMString srclang; 545 [CEReactions, Reflect] attribute DOMString label; 546 [CEReactions, Reflect] attribute boolean default; 547 548 const unsigned short NONE = 0; 549 const unsigned short LOADING = 1; 550 const unsigned short LOADED = 2; 551 const unsigned short ERROR = 3; 552 readonly attribute unsigned short readyState; 553 554 readonly attribute TextTrack track; 555 }; 556 557 enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; 558 typedef (MediaStream or MediaSource or Blob) MediaProvider; 559 560 [Exposed=Window] 561 interface HTMLMediaElement : HTMLElement { 562 563 // error state 564 readonly attribute MediaError? error; 565 566 // network state 567 [CEReactions, ReflectURL] attribute USVString src; 568 attribute MediaProvider? srcObject; 569 readonly attribute USVString currentSrc; 570 [CEReactions] attribute DOMString? crossOrigin; 571 const unsigned short NETWORK_EMPTY = 0; 572 const unsigned short NETWORK_IDLE = 1; 573 const unsigned short NETWORK_LOADING = 2; 574 const unsigned short NETWORK_NO_SOURCE = 3; 575 readonly attribute unsigned short networkState; 576 [CEReactions] attribute DOMString preload; 577 readonly attribute TimeRanges buffered; 578 undefined load(); 579 CanPlayTypeResult canPlayType(DOMString type); 580 581 // ready state 582 const unsigned short HAVE_NOTHING = 0; 583 const unsigned short HAVE_METADATA = 1; 584 const unsigned short HAVE_CURRENT_DATA = 2; 585 const unsigned short HAVE_FUTURE_DATA = 3; 586 const unsigned short HAVE_ENOUGH_DATA = 4; 587 readonly attribute unsigned short readyState; 588 readonly attribute boolean seeking; 589 590 // playback state 591 attribute double currentTime; 592 undefined fastSeek(double time); 593 readonly attribute unrestricted double duration; 594 object getStartDate(); 595 readonly attribute boolean paused; 596 attribute double defaultPlaybackRate; 597 attribute double playbackRate; 598 attribute boolean preservesPitch; 599 readonly attribute TimeRanges played; 600 readonly attribute TimeRanges seekable; 601 readonly attribute boolean ended; 602 [CEReactions, Reflect] attribute boolean autoplay; 603 [CEReactions, Reflect] attribute boolean loop; 604 Promise<undefined> play(); 605 undefined pause(); 606 607 // controls 608 [CEReactions, Reflect] attribute boolean controls; 609 attribute double volume; 610 attribute boolean muted; 611 [CEReactions, Reflect="muted"] attribute boolean defaultMuted; 612 613 // tracks 614 [SameObject] readonly attribute AudioTrackList audioTracks; 615 [SameObject] readonly attribute VideoTrackList videoTracks; 616 [SameObject] readonly attribute TextTrackList textTracks; 617 TextTrack addTextTrack(TextTrackKind kind, optional DOMString label = "", optional DOMString language = ""); 618 }; 619 620 [Exposed=Window] 621 interface MediaError { 622 const unsigned short MEDIA_ERR_ABORTED = 1; 623 const unsigned short MEDIA_ERR_NETWORK = 2; 624 const unsigned short MEDIA_ERR_DECODE = 3; 625 const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; 626 627 readonly attribute unsigned short code; 628 readonly attribute DOMString message; 629 }; 630 631 [Exposed=Window] 632 interface AudioTrackList : EventTarget { 633 readonly attribute unsigned long length; 634 getter AudioTrack (unsigned long index); 635 AudioTrack? getTrackById(DOMString id); 636 637 attribute EventHandler onchange; 638 attribute EventHandler onaddtrack; 639 attribute EventHandler onremovetrack; 640 }; 641 642 [Exposed=Window] 643 interface AudioTrack { 644 readonly attribute DOMString id; 645 readonly attribute DOMString kind; 646 readonly attribute DOMString label; 647 readonly attribute DOMString language; 648 attribute boolean enabled; 649 }; 650 651 [Exposed=Window] 652 interface VideoTrackList : EventTarget { 653 readonly attribute unsigned long length; 654 getter VideoTrack (unsigned long index); 655 VideoTrack? getTrackById(DOMString id); 656 readonly attribute long selectedIndex; 657 658 attribute EventHandler onchange; 659 attribute EventHandler onaddtrack; 660 attribute EventHandler onremovetrack; 661 }; 662 663 [Exposed=Window] 664 interface VideoTrack { 665 readonly attribute DOMString id; 666 readonly attribute DOMString kind; 667 readonly attribute DOMString label; 668 readonly attribute DOMString language; 669 attribute boolean selected; 670 }; 671 672 [Exposed=Window] 673 interface TextTrackList : EventTarget { 674 readonly attribute unsigned long length; 675 getter TextTrack (unsigned long index); 676 TextTrack? getTrackById(DOMString id); 677 678 attribute EventHandler onchange; 679 attribute EventHandler onaddtrack; 680 attribute EventHandler onremovetrack; 681 }; 682 683 enum TextTrackMode { "disabled", "hidden", "showing" }; 684 enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" }; 685 686 [Exposed=Window] 687 interface TextTrack : EventTarget { 688 readonly attribute TextTrackKind kind; 689 readonly attribute DOMString label; 690 readonly attribute DOMString language; 691 692 readonly attribute DOMString id; 693 readonly attribute DOMString inBandMetadataTrackDispatchType; 694 695 attribute TextTrackMode mode; 696 697 readonly attribute TextTrackCueList? cues; 698 readonly attribute TextTrackCueList? activeCues; 699 700 undefined addCue(TextTrackCue cue); 701 undefined removeCue(TextTrackCue cue); 702 703 attribute EventHandler oncuechange; 704 }; 705 706 [Exposed=Window] 707 interface TextTrackCueList { 708 readonly attribute unsigned long length; 709 getter TextTrackCue (unsigned long index); 710 TextTrackCue? getCueById(DOMString id); 711 }; 712 713 [Exposed=Window] 714 interface TextTrackCue : EventTarget { 715 readonly attribute TextTrack? track; 716 717 attribute DOMString id; 718 attribute double startTime; 719 attribute unrestricted double endTime; 720 attribute boolean pauseOnExit; 721 722 attribute EventHandler onenter; 723 attribute EventHandler onexit; 724 }; 725 726 [Exposed=Window] 727 interface TimeRanges { 728 readonly attribute unsigned long length; 729 double start(unsigned long index); 730 double end(unsigned long index); 731 }; 732 733 [Exposed=Window] 734 interface TrackEvent : Event { 735 constructor(DOMString type, optional TrackEventInit eventInitDict = {}); 736 737 readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; 738 }; 739 740 dictionary TrackEventInit : EventInit { 741 (VideoTrack or AudioTrack or TextTrack)? track = null; 742 }; 743 744 [Exposed=Window] 745 interface HTMLMapElement : HTMLElement { 746 [HTMLConstructor] constructor(); 747 748 [CEReactions, Reflect] attribute DOMString name; 749 [SameObject] readonly attribute HTMLCollection areas; 750 }; 751 752 [Exposed=Window] 753 interface HTMLAreaElement : HTMLElement { 754 [HTMLConstructor] constructor(); 755 756 [CEReactions, Reflect] attribute DOMString alt; 757 [CEReactions, Reflect] attribute DOMString coords; 758 [CEReactions, Reflect] attribute DOMString shape; 759 [CEReactions, Reflect] attribute DOMString target; 760 [CEReactions, Reflect] attribute DOMString download; 761 [CEReactions, Reflect] attribute USVString ping; 762 [CEReactions, Reflect] attribute DOMString rel; 763 [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList; 764 [CEReactions] attribute DOMString referrerPolicy; 765 766 // also has obsolete members 767 }; 768 HTMLAreaElement includes HTMLHyperlinkElementUtils; 769 770 [Exposed=Window] 771 interface HTMLTableElement : HTMLElement { 772 [HTMLConstructor] constructor(); 773 774 [CEReactions] attribute HTMLTableCaptionElement? caption; 775 HTMLTableCaptionElement createCaption(); 776 [CEReactions] undefined deleteCaption(); 777 778 [CEReactions] attribute HTMLTableSectionElement? tHead; 779 HTMLTableSectionElement createTHead(); 780 [CEReactions] undefined deleteTHead(); 781 782 [CEReactions] attribute HTMLTableSectionElement? tFoot; 783 HTMLTableSectionElement createTFoot(); 784 [CEReactions] undefined deleteTFoot(); 785 786 [SameObject] readonly attribute HTMLCollection tBodies; 787 HTMLTableSectionElement createTBody(); 788 789 [SameObject] readonly attribute HTMLCollection rows; 790 HTMLTableRowElement insertRow(optional long index = -1); 791 [CEReactions] undefined deleteRow(long index); 792 793 // also has obsolete members 794 }; 795 796 [Exposed=Window] 797 interface HTMLTableCaptionElement : HTMLElement { 798 [HTMLConstructor] constructor(); 799 800 // also has obsolete members 801 }; 802 803 [Exposed=Window] 804 interface HTMLTableColElement : HTMLElement { 805 [HTMLConstructor] constructor(); 806 807 [CEReactions, Reflect, ReflectDefault=1, ReflectRange=(1, 1000)] attribute unsigned long span; 808 809 // also has obsolete members 810 }; 811 812 [Exposed=Window] 813 interface HTMLTableSectionElement : HTMLElement { 814 [HTMLConstructor] constructor(); 815 816 [SameObject] readonly attribute HTMLCollection rows; 817 HTMLTableRowElement insertRow(optional long index = -1); 818 [CEReactions] undefined deleteRow(long index); 819 820 // also has obsolete members 821 }; 822 823 [Exposed=Window] 824 interface HTMLTableRowElement : HTMLElement { 825 [HTMLConstructor] constructor(); 826 827 readonly attribute long rowIndex; 828 readonly attribute long sectionRowIndex; 829 [SameObject] readonly attribute HTMLCollection cells; 830 HTMLTableCellElement insertCell(optional long index = -1); 831 [CEReactions] undefined deleteCell(long index); 832 833 // also has obsolete members 834 }; 835 836 [Exposed=Window] 837 interface HTMLTableCellElement : HTMLElement { 838 [HTMLConstructor] constructor(); 839 840 [CEReactions, Reflect, ReflectDefault=1, ReflectRange=(1, 1000)] attribute unsigned long colSpan; 841 [CEReactions, Reflect, ReflectDefault=1, ReflectRange=(0, 65534)] attribute unsigned long rowSpan; 842 [CEReactions, Reflect] attribute DOMString headers; 843 readonly attribute long cellIndex; 844 845 [CEReactions] attribute DOMString scope; // only conforming for th elements 846 [CEReactions, Reflect] attribute DOMString abbr; // only conforming for th elements 847 848 // also has obsolete members 849 }; 850 851 [Exposed=Window, 852 LegacyOverrideBuiltIns, 853 LegacyUnenumerableNamedProperties] 854 interface HTMLFormElement : HTMLElement { 855 [HTMLConstructor] constructor(); 856 857 [CEReactions, Reflect="accept-charset"] attribute DOMString acceptCharset; 858 [CEReactions, ReflectSetter] attribute USVString action; 859 [CEReactions] attribute DOMString autocomplete; 860 [CEReactions] attribute DOMString enctype; 861 [CEReactions] attribute DOMString encoding; 862 [CEReactions] attribute DOMString method; 863 [CEReactions, Reflect] attribute DOMString name; 864 [CEReactions, Reflect] attribute boolean noValidate; 865 [CEReactions, Reflect] attribute DOMString target; 866 [CEReactions, Reflect] attribute DOMString rel; 867 [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList; 868 869 [SameObject] readonly attribute HTMLFormControlsCollection elements; 870 readonly attribute unsigned long length; 871 getter Element (unsigned long index); 872 getter (RadioNodeList or Element) (DOMString name); 873 874 undefined submit(); 875 undefined requestSubmit(optional HTMLElement? submitter = null); 876 [CEReactions] undefined reset(); 877 boolean checkValidity(); 878 boolean reportValidity(); 879 }; 880 881 [Exposed=Window] 882 interface HTMLLabelElement : HTMLElement { 883 [HTMLConstructor] constructor(); 884 885 readonly attribute HTMLFormElement? form; 886 [CEReactions, Reflect="for"] attribute DOMString htmlFor; 887 readonly attribute HTMLElement? control; 888 }; 889 890 [Exposed=Window] 891 interface HTMLInputElement : HTMLElement { 892 [HTMLConstructor] constructor(); 893 894 [CEReactions, Reflect] attribute DOMString accept; 895 [CEReactions, Reflect] attribute boolean alpha; 896 [CEReactions, Reflect] attribute DOMString alt; 897 [CEReactions, ReflectSetter] attribute DOMString autocomplete; 898 [CEReactions, Reflect="checked"] attribute boolean defaultChecked; 899 attribute boolean checked; 900 [CEReactions] attribute DOMString colorSpace; 901 [CEReactions, Reflect] attribute DOMString dirName; 902 [CEReactions, Reflect] attribute boolean disabled; 903 readonly attribute HTMLFormElement? form; 904 attribute FileList? files; 905 [CEReactions, ReflectSetter] attribute USVString formAction; 906 [CEReactions] attribute DOMString formEnctype; 907 [CEReactions] attribute DOMString formMethod; 908 [CEReactions, Reflect] attribute boolean formNoValidate; 909 [CEReactions, Reflect] attribute DOMString formTarget; 910 [CEReactions, ReflectSetter] attribute unsigned long height; 911 attribute boolean indeterminate; 912 readonly attribute HTMLDataListElement? list; 913 [CEReactions, Reflect] attribute DOMString max; 914 [CEReactions, ReflectNonNegative] attribute long maxLength; 915 [CEReactions, Reflect] attribute DOMString min; 916 [CEReactions, ReflectNonNegative] attribute long minLength; 917 [CEReactions, Reflect] attribute boolean multiple; 918 [CEReactions, Reflect] attribute DOMString name; 919 [CEReactions, Reflect] attribute DOMString pattern; 920 [CEReactions, Reflect] attribute DOMString placeholder; 921 [CEReactions, Reflect] attribute boolean readOnly; 922 [CEReactions, Reflect] attribute boolean required; 923 [CEReactions, Reflect] attribute unsigned long size; 924 [CEReactions, ReflectURL] attribute USVString src; 925 [CEReactions, Reflect] attribute DOMString step; 926 [CEReactions] attribute DOMString type; 927 [CEReactions, Reflect="value"] attribute DOMString defaultValue; 928 [CEReactions] attribute [LegacyNullToEmptyString] DOMString value; 929 attribute object? valueAsDate; 930 attribute unrestricted double valueAsNumber; 931 [CEReactions, ReflectSetter] attribute unsigned long width; 932 933 undefined stepUp(optional long n = 1); 934 undefined stepDown(optional long n = 1); 935 936 readonly attribute boolean willValidate; 937 readonly attribute ValidityState validity; 938 readonly attribute DOMString validationMessage; 939 boolean checkValidity(); 940 boolean reportValidity(); 941 undefined setCustomValidity(DOMString error); 942 943 readonly attribute NodeList? labels; 944 945 undefined select(); 946 attribute unsigned long? selectionStart; 947 attribute unsigned long? selectionEnd; 948 attribute DOMString? selectionDirection; 949 undefined setRangeText(DOMString replacement); 950 undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); 951 undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 952 953 undefined showPicker(); 954 955 // also has obsolete members 956 }; 957 HTMLInputElement includes PopoverTargetAttributes; 958 959 [Exposed=Window] 960 interface HTMLButtonElement : HTMLElement { 961 [HTMLConstructor] constructor(); 962 963 [CEReactions, ReflectSetter] attribute DOMString command; 964 [CEReactions, Reflect] attribute Element? commandForElement; 965 [CEReactions, Reflect] attribute boolean disabled; 966 readonly attribute HTMLFormElement? form; 967 [CEReactions, ReflectSetter] attribute USVString formAction; 968 [CEReactions] attribute DOMString formEnctype; 969 [CEReactions] attribute DOMString formMethod; 970 [CEReactions, Reflect] attribute boolean formNoValidate; 971 [CEReactions, Reflect] attribute DOMString formTarget; 972 [CEReactions, Reflect] attribute DOMString name; 973 [CEReactions, ReflectSetter] attribute DOMString type; 974 [CEReactions, Reflect] attribute DOMString value; 975 976 readonly attribute boolean willValidate; 977 readonly attribute ValidityState validity; 978 readonly attribute DOMString validationMessage; 979 boolean checkValidity(); 980 boolean reportValidity(); 981 undefined setCustomValidity(DOMString error); 982 983 readonly attribute NodeList labels; 984 }; 985 HTMLButtonElement includes PopoverTargetAttributes; 986 987 [Exposed=Window] 988 interface HTMLSelectElement : HTMLElement { 989 [HTMLConstructor] constructor(); 990 991 [CEReactions, ReflectSetter] attribute DOMString autocomplete; 992 [CEReactions, Reflect] attribute boolean disabled; 993 readonly attribute HTMLFormElement? form; 994 [CEReactions, Reflect] attribute boolean multiple; 995 [CEReactions, Reflect] attribute DOMString name; 996 [CEReactions, Reflect] attribute boolean required; 997 [CEReactions, Reflect, ReflectDefault=0] attribute unsigned long size; 998 999 readonly attribute DOMString type; 1000 1001 [SameObject] readonly attribute HTMLOptionsCollection options; 1002 [CEReactions] attribute unsigned long length; 1003 getter HTMLOptionElement? item(unsigned long index); 1004 HTMLOptionElement? namedItem(DOMString name); 1005 [CEReactions] undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); 1006 [CEReactions] undefined remove(); // ChildNode overload 1007 [CEReactions] undefined remove(long index); 1008 [CEReactions] setter undefined (unsigned long index, HTMLOptionElement? option); 1009 1010 [SameObject] readonly attribute HTMLCollection selectedOptions; 1011 attribute long selectedIndex; 1012 attribute DOMString value; 1013 1014 readonly attribute boolean willValidate; 1015 readonly attribute ValidityState validity; 1016 readonly attribute DOMString validationMessage; 1017 boolean checkValidity(); 1018 boolean reportValidity(); 1019 undefined setCustomValidity(DOMString error); 1020 1021 undefined showPicker(); 1022 1023 readonly attribute NodeList labels; 1024 }; 1025 1026 [Exposed=Window] 1027 interface HTMLDataListElement : HTMLElement { 1028 [HTMLConstructor] constructor(); 1029 1030 [SameObject] readonly attribute HTMLCollection options; 1031 }; 1032 1033 [Exposed=Window] 1034 interface HTMLOptGroupElement : HTMLElement { 1035 [HTMLConstructor] constructor(); 1036 1037 [CEReactions, Reflect] attribute boolean disabled; 1038 [CEReactions, Reflect] attribute DOMString label; 1039 }; 1040 1041 [Exposed=Window, 1042 LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)] 1043 interface HTMLOptionElement : HTMLElement { 1044 [HTMLConstructor] constructor(); 1045 1046 [CEReactions, Reflect] attribute boolean disabled; 1047 readonly attribute HTMLFormElement? form; 1048 [CEReactions, ReflectSetter] attribute DOMString label; 1049 [CEReactions, Reflect="selected"] attribute boolean defaultSelected; 1050 attribute boolean selected; 1051 [CEReactions, ReflectSetter] attribute DOMString value; 1052 1053 [CEReactions] attribute DOMString text; 1054 readonly attribute long index; 1055 }; 1056 1057 [Exposed=Window] 1058 interface HTMLTextAreaElement : HTMLElement { 1059 [HTMLConstructor] constructor(); 1060 1061 [CEReactions, ReflectSetter] attribute DOMString autocomplete; 1062 [CEReactions, ReflectPositiveWithFallback, ReflectDefault=20] attribute unsigned long cols; 1063 [CEReactions, Reflect] attribute DOMString dirName; 1064 [CEReactions, Reflect] attribute boolean disabled; 1065 readonly attribute HTMLFormElement? form; 1066 [CEReactions, ReflectNonNegative] attribute long maxLength; 1067 [CEReactions, ReflectNonNegative] attribute long minLength; 1068 [CEReactions, Reflect] attribute DOMString name; 1069 [CEReactions, Reflect] attribute DOMString placeholder; 1070 [CEReactions, Reflect] attribute boolean readOnly; 1071 [CEReactions, Reflect] attribute boolean required; 1072 [CEReactions, ReflectPositiveWithFallback, ReflectDefault=2] attribute unsigned long rows; 1073 [CEReactions, Reflect] attribute DOMString wrap; 1074 1075 readonly attribute DOMString type; 1076 [CEReactions] attribute DOMString defaultValue; 1077 attribute [LegacyNullToEmptyString] DOMString value; 1078 readonly attribute unsigned long textLength; 1079 1080 readonly attribute boolean willValidate; 1081 readonly attribute ValidityState validity; 1082 readonly attribute DOMString validationMessage; 1083 boolean checkValidity(); 1084 boolean reportValidity(); 1085 undefined setCustomValidity(DOMString error); 1086 1087 readonly attribute NodeList labels; 1088 1089 undefined select(); 1090 attribute unsigned long selectionStart; 1091 attribute unsigned long selectionEnd; 1092 attribute DOMString selectionDirection; 1093 undefined setRangeText(DOMString replacement); 1094 undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); 1095 undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 1096 }; 1097 1098 [Exposed=Window] 1099 interface HTMLOutputElement : HTMLElement { 1100 [HTMLConstructor] constructor(); 1101 1102 [SameObject, PutForwards=value, Reflect="for"] readonly attribute DOMTokenList htmlFor; 1103 readonly attribute HTMLFormElement? form; 1104 [CEReactions, Reflect] attribute DOMString name; 1105 1106 readonly attribute DOMString type; 1107 [CEReactions] attribute DOMString defaultValue; 1108 [CEReactions] attribute DOMString value; 1109 1110 readonly attribute boolean willValidate; 1111 readonly attribute ValidityState validity; 1112 readonly attribute DOMString validationMessage; 1113 boolean checkValidity(); 1114 boolean reportValidity(); 1115 undefined setCustomValidity(DOMString error); 1116 1117 readonly attribute NodeList labels; 1118 }; 1119 1120 [Exposed=Window] 1121 interface HTMLProgressElement : HTMLElement { 1122 [HTMLConstructor] constructor(); 1123 1124 [CEReactions, ReflectSetter] attribute double value; 1125 [CEReactions, ReflectPositive, ReflectDefault=1.0] attribute double max; 1126 readonly attribute double position; 1127 readonly attribute NodeList labels; 1128 }; 1129 1130 [Exposed=Window] 1131 interface HTMLMeterElement : HTMLElement { 1132 [HTMLConstructor] constructor(); 1133 1134 [CEReactions, ReflectSetter] attribute double value; 1135 [CEReactions, ReflectSetter] attribute double min; 1136 [CEReactions, ReflectSetter] attribute double max; 1137 [CEReactions, ReflectSetter] attribute double low; 1138 [CEReactions, ReflectSetter] attribute double high; 1139 [CEReactions, ReflectSetter] attribute double optimum; 1140 readonly attribute NodeList labels; 1141 }; 1142 1143 [Exposed=Window] 1144 interface HTMLFieldSetElement : HTMLElement { 1145 [HTMLConstructor] constructor(); 1146 1147 [CEReactions, Reflect] attribute boolean disabled; 1148 readonly attribute HTMLFormElement? form; 1149 [CEReactions, Reflect] attribute DOMString name; 1150 1151 readonly attribute DOMString type; 1152 1153 [SameObject] readonly attribute HTMLCollection elements; 1154 1155 readonly attribute boolean willValidate; 1156 [SameObject] readonly attribute ValidityState validity; 1157 readonly attribute DOMString validationMessage; 1158 boolean checkValidity(); 1159 boolean reportValidity(); 1160 undefined setCustomValidity(DOMString error); 1161 }; 1162 1163 [Exposed=Window] 1164 interface HTMLLegendElement : HTMLElement { 1165 [HTMLConstructor] constructor(); 1166 1167 readonly attribute HTMLFormElement? form; 1168 1169 // also has obsolete members 1170 }; 1171 1172 [Exposed=Window] 1173 interface HTMLSelectedContentElement : HTMLElement { 1174 [HTMLConstructor] constructor(); 1175 }; 1176 1177 enum SelectionMode { 1178 "select", 1179 "start", 1180 "end", 1181 "preserve" // default 1182 }; 1183 1184 [Exposed=Window] 1185 interface ValidityState { 1186 readonly attribute boolean valueMissing; 1187 readonly attribute boolean typeMismatch; 1188 readonly attribute boolean patternMismatch; 1189 readonly attribute boolean tooLong; 1190 readonly attribute boolean tooShort; 1191 readonly attribute boolean rangeUnderflow; 1192 readonly attribute boolean rangeOverflow; 1193 readonly attribute boolean stepMismatch; 1194 readonly attribute boolean badInput; 1195 readonly attribute boolean customError; 1196 readonly attribute boolean valid; 1197 }; 1198 1199 [Exposed=Window] 1200 interface SubmitEvent : Event { 1201 constructor(DOMString type, optional SubmitEventInit eventInitDict = {}); 1202 1203 readonly attribute HTMLElement? submitter; 1204 }; 1205 1206 dictionary SubmitEventInit : EventInit { 1207 HTMLElement? submitter = null; 1208 }; 1209 1210 [Exposed=Window] 1211 interface FormDataEvent : Event { 1212 constructor(DOMString type, FormDataEventInit eventInitDict); 1213 1214 readonly attribute FormData formData; 1215 }; 1216 1217 dictionary FormDataEventInit : EventInit { 1218 required FormData formData; 1219 }; 1220 1221 [Exposed=Window] 1222 interface HTMLDetailsElement : HTMLElement { 1223 [HTMLConstructor] constructor(); 1224 1225 [CEReactions, Reflect] attribute DOMString name; 1226 [CEReactions, Reflect] attribute boolean open; 1227 }; 1228 1229 [Exposed=Window] 1230 interface HTMLDialogElement : HTMLElement { 1231 [HTMLConstructor] constructor(); 1232 1233 [CEReactions, Reflect] attribute boolean open; 1234 attribute DOMString returnValue; 1235 [CEReactions, ReflectSetter] attribute DOMString closedBy; 1236 [CEReactions] undefined show(); 1237 [CEReactions] undefined showModal(); 1238 [CEReactions] undefined close(optional DOMString returnValue); 1239 [CEReactions] undefined requestClose(optional DOMString returnValue); 1240 }; 1241 1242 [Exposed=Window] 1243 interface HTMLScriptElement : HTMLElement { 1244 [HTMLConstructor] constructor(); 1245 1246 [CEReactions, Reflect] attribute DOMString type; 1247 [CEReactions, ReflectURL] attribute USVString src; 1248 [CEReactions, Reflect] attribute boolean noModule; 1249 [CEReactions] attribute boolean async; 1250 [CEReactions, Reflect] attribute boolean defer; 1251 [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList blocking; 1252 [CEReactions] attribute DOMString? crossOrigin; 1253 [CEReactions] attribute DOMString referrerPolicy; 1254 [CEReactions, Reflect] attribute DOMString integrity; 1255 [CEReactions] attribute DOMString fetchPriority; 1256 1257 [CEReactions] attribute DOMString text; 1258 1259 static boolean supports(DOMString type); 1260 1261 // also has obsolete members 1262 }; 1263 1264 [Exposed=Window] 1265 interface HTMLTemplateElement : HTMLElement { 1266 [HTMLConstructor] constructor(); 1267 1268 readonly attribute DocumentFragment content; 1269 [CEReactions] attribute DOMString shadowRootMode; 1270 [CEReactions, Reflect] attribute boolean shadowRootDelegatesFocus; 1271 [CEReactions, Reflect] attribute boolean shadowRootClonable; 1272 [CEReactions, Reflect] attribute boolean shadowRootSerializable; 1273 [CEReactions, Reflect] attribute DOMString shadowRootCustomElementRegistry; 1274 }; 1275 1276 [Exposed=Window] 1277 interface HTMLSlotElement : HTMLElement { 1278 [HTMLConstructor] constructor(); 1279 1280 [CEReactions, Reflect] attribute DOMString name; 1281 sequence<Node> assignedNodes(optional AssignedNodesOptions options = {}); 1282 sequence<Element> assignedElements(optional AssignedNodesOptions options = {}); 1283 undefined assign((Element or Text)... nodes); 1284 }; 1285 1286 dictionary AssignedNodesOptions { 1287 boolean flatten = false; 1288 }; 1289 1290 typedef (CanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) RenderingContext; 1291 1292 [Exposed=Window] 1293 interface HTMLCanvasElement : HTMLElement { 1294 [HTMLConstructor] constructor(); 1295 1296 [CEReactions] attribute unsigned long width; 1297 [CEReactions] attribute unsigned long height; 1298 1299 RenderingContext? getContext(DOMString contextId, optional any options = null); 1300 1301 USVString toDataURL(optional DOMString type = "image/png", optional any quality); 1302 undefined toBlob(BlobCallback _callback, optional DOMString type = "image/png", optional any quality); 1303 OffscreenCanvas transferControlToOffscreen(); 1304 }; 1305 1306 callback BlobCallback = undefined (Blob? blob); 1307 1308 typedef (HTMLImageElement or 1309 SVGImageElement) HTMLOrSVGImageElement; 1310 1311 typedef (HTMLOrSVGImageElement or 1312 HTMLVideoElement or 1313 HTMLCanvasElement or 1314 ImageBitmap or 1315 OffscreenCanvas or 1316 VideoFrame) CanvasImageSource; 1317 1318 enum CanvasColorType { "unorm8", "float16" }; 1319 1320 enum CanvasFillRule { "nonzero", "evenodd" }; 1321 1322 dictionary CanvasRenderingContext2DSettings { 1323 boolean alpha = true; 1324 boolean desynchronized = false; 1325 PredefinedColorSpace colorSpace = "srgb"; 1326 CanvasColorType colorType = "unorm8"; 1327 boolean willReadFrequently = false; 1328 }; 1329 1330 enum ImageSmoothingQuality { "low", "medium", "high" }; 1331 1332 [Exposed=Window] 1333 interface CanvasRenderingContext2D { 1334 // back-reference to the canvas 1335 readonly attribute HTMLCanvasElement canvas; 1336 }; 1337 CanvasRenderingContext2D includes CanvasSettings; 1338 CanvasRenderingContext2D includes CanvasState; 1339 CanvasRenderingContext2D includes CanvasTransform; 1340 CanvasRenderingContext2D includes CanvasCompositing; 1341 CanvasRenderingContext2D includes CanvasImageSmoothing; 1342 CanvasRenderingContext2D includes CanvasFillStrokeStyles; 1343 CanvasRenderingContext2D includes CanvasShadowStyles; 1344 CanvasRenderingContext2D includes CanvasFilters; 1345 CanvasRenderingContext2D includes CanvasRect; 1346 CanvasRenderingContext2D includes CanvasDrawPath; 1347 CanvasRenderingContext2D includes CanvasUserInterface; 1348 CanvasRenderingContext2D includes CanvasText; 1349 CanvasRenderingContext2D includes CanvasDrawImage; 1350 CanvasRenderingContext2D includes CanvasImageData; 1351 CanvasRenderingContext2D includes CanvasPathDrawingStyles; 1352 CanvasRenderingContext2D includes CanvasTextDrawingStyles; 1353 CanvasRenderingContext2D includes CanvasPath; 1354 1355 interface mixin CanvasSettings { 1356 // settings 1357 CanvasRenderingContext2DSettings getContextAttributes(); 1358 }; 1359 1360 interface mixin CanvasState { 1361 // state 1362 undefined save(); // push state on state stack 1363 undefined restore(); // pop state stack and restore state 1364 undefined reset(); // reset the rendering context to its default state 1365 boolean isContextLost(); // return whether context is lost 1366 }; 1367 1368 interface mixin CanvasTransform { 1369 // transformations (default transform is the identity matrix) 1370 undefined scale(unrestricted double x, unrestricted double y); 1371 undefined rotate(unrestricted double angle); 1372 undefined translate(unrestricted double x, unrestricted double y); 1373 undefined transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); 1374 1375 [NewObject] DOMMatrix getTransform(); 1376 undefined setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); 1377 undefined setTransform(optional DOMMatrix2DInit transform = {}); 1378 undefined resetTransform(); 1379 1380 }; 1381 1382 interface mixin CanvasCompositing { 1383 // compositing 1384 attribute unrestricted double globalAlpha; // (default 1.0) 1385 attribute DOMString globalCompositeOperation; // (default "source-over") 1386 }; 1387 1388 interface mixin CanvasImageSmoothing { 1389 // image smoothing 1390 attribute boolean imageSmoothingEnabled; // (default true) 1391 attribute ImageSmoothingQuality imageSmoothingQuality; // (default low) 1392 1393 }; 1394 1395 interface mixin CanvasFillStrokeStyles { 1396 // colors and styles (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) 1397 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) 1398 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black) 1399 CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); 1400 CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); 1401 CanvasGradient createConicGradient(double startAngle, double x, double y); 1402 CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition); 1403 1404 }; 1405 1406 interface mixin CanvasShadowStyles { 1407 // shadows 1408 attribute unrestricted double shadowOffsetX; // (default 0) 1409 attribute unrestricted double shadowOffsetY; // (default 0) 1410 attribute unrestricted double shadowBlur; // (default 0) 1411 attribute DOMString shadowColor; // (default transparent black) 1412 }; 1413 1414 interface mixin CanvasFilters { 1415 // filters 1416 attribute DOMString filter; // (default "none") 1417 }; 1418 1419 interface mixin CanvasRect { 1420 // rects 1421 undefined clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1422 undefined fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1423 undefined strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1424 }; 1425 1426 interface mixin CanvasDrawPath { 1427 // path API (see also CanvasPath) 1428 undefined beginPath(); 1429 undefined fill(optional CanvasFillRule fillRule = "nonzero"); 1430 undefined fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); 1431 undefined stroke(); 1432 undefined stroke(Path2D path); 1433 undefined clip(optional CanvasFillRule fillRule = "nonzero"); 1434 undefined clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); 1435 boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); 1436 boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); 1437 boolean isPointInStroke(unrestricted double x, unrestricted double y); 1438 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); 1439 }; 1440 1441 interface mixin CanvasUserInterface { 1442 undefined drawFocusIfNeeded(Element element); 1443 undefined drawFocusIfNeeded(Path2D path, Element element); 1444 }; 1445 1446 interface mixin CanvasText { 1447 // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) 1448 undefined fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1449 undefined strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1450 TextMetrics measureText(DOMString text); 1451 }; 1452 1453 interface mixin CanvasDrawImage { 1454 // drawing images 1455 undefined drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); 1456 undefined drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); 1457 undefined drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); 1458 }; 1459 1460 interface mixin CanvasImageData { 1461 // pixel manipulation 1462 ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {}); 1463 ImageData createImageData(ImageData imageData); 1464 ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {}); 1465 undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy); 1466 undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight); 1467 }; 1468 1469 enum CanvasLineCap { "butt", "round", "square" }; 1470 enum CanvasLineJoin { "round", "bevel", "miter" }; 1471 enum CanvasTextAlign { "start", "end", "left", "right", "center" }; 1472 enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" }; 1473 enum CanvasDirection { "ltr", "rtl", "inherit" }; 1474 enum CanvasFontKerning { "auto", "normal", "none" }; 1475 enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" }; 1476 enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" }; 1477 enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" }; 1478 1479 interface mixin CanvasPathDrawingStyles { 1480 // line caps/joins 1481 attribute unrestricted double lineWidth; // (default 1) 1482 attribute CanvasLineCap lineCap; // (default "butt") 1483 attribute CanvasLineJoin lineJoin; // (default "miter") 1484 attribute unrestricted double miterLimit; // (default 10) 1485 1486 // dashed lines 1487 undefined setLineDash(sequence<unrestricted double> segments); // default empty 1488 sequence<unrestricted double> getLineDash(); 1489 attribute unrestricted double lineDashOffset; 1490 }; 1491 1492 interface mixin CanvasTextDrawingStyles { 1493 // text 1494 attribute DOMString lang; // (default: "inherit") 1495 attribute DOMString font; // (default 10px sans-serif) 1496 attribute CanvasTextAlign textAlign; // (default: "start") 1497 attribute CanvasTextBaseline textBaseline; // (default: "alphabetic") 1498 attribute CanvasDirection direction; // (default: "inherit") 1499 attribute DOMString letterSpacing; // (default: "0px") 1500 attribute CanvasFontKerning fontKerning; // (default: "auto") 1501 attribute CanvasFontStretch fontStretch; // (default: "normal") 1502 attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal") 1503 attribute CanvasTextRendering textRendering; // (default: "auto") 1504 attribute DOMString wordSpacing; // (default: "0px") 1505 }; 1506 1507 interface mixin CanvasPath { 1508 // shared path API methods 1509 undefined closePath(); 1510 undefined moveTo(unrestricted double x, unrestricted double y); 1511 undefined lineTo(unrestricted double x, unrestricted double y); 1512 undefined quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y); 1513 undefined bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y); 1514 undefined arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); 1515 undefined rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1516 undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>) radii = 0); 1517 undefined arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean counterclockwise = false); 1518 undefined ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean counterclockwise = false); 1519 }; 1520 1521 [Exposed=(Window,Worker)] 1522 interface CanvasGradient { 1523 // opaque object 1524 undefined addColorStop(double offset, DOMString color); 1525 }; 1526 1527 [Exposed=(Window,Worker)] 1528 interface CanvasPattern { 1529 // opaque object 1530 undefined setTransform(optional DOMMatrix2DInit transform = {}); 1531 }; 1532 1533 [Exposed=(Window,Worker)] 1534 interface TextMetrics { 1535 // x-direction 1536 readonly attribute double width; // advance width 1537 readonly attribute double actualBoundingBoxLeft; 1538 readonly attribute double actualBoundingBoxRight; 1539 1540 // y-direction 1541 readonly attribute double fontBoundingBoxAscent; 1542 readonly attribute double fontBoundingBoxDescent; 1543 readonly attribute double actualBoundingBoxAscent; 1544 readonly attribute double actualBoundingBoxDescent; 1545 readonly attribute double emHeightAscent; 1546 readonly attribute double emHeightDescent; 1547 readonly attribute double hangingBaseline; 1548 readonly attribute double alphabeticBaseline; 1549 readonly attribute double ideographicBaseline; 1550 }; 1551 1552 [Exposed=(Window,Worker)] 1553 interface Path2D { 1554 constructor(optional (Path2D or DOMString) path); 1555 1556 undefined addPath(Path2D path, optional DOMMatrix2DInit transform = {}); 1557 }; 1558 Path2D includes CanvasPath; 1559 1560 [Exposed=(Window,Worker)] 1561 interface ImageBitmapRenderingContext { 1562 readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas; 1563 undefined transferFromImageBitmap(ImageBitmap? bitmap); 1564 }; 1565 1566 dictionary ImageBitmapRenderingContextSettings { 1567 boolean alpha = true; 1568 }; 1569 1570 typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) OffscreenRenderingContext; 1571 1572 dictionary ImageEncodeOptions { 1573 DOMString type = "image/png"; 1574 unrestricted double quality; 1575 }; 1576 1577 enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2", "webgpu" }; 1578 1579 [Exposed=(Window,Worker), Transferable] 1580 interface OffscreenCanvas : EventTarget { 1581 constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height); 1582 1583 attribute [EnforceRange] unsigned long long width; 1584 attribute [EnforceRange] unsigned long long height; 1585 1586 OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null); 1587 ImageBitmap transferToImageBitmap(); 1588 Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {}); 1589 1590 attribute EventHandler oncontextlost; 1591 attribute EventHandler oncontextrestored; 1592 }; 1593 1594 [Exposed=(Window,Worker)] 1595 interface OffscreenCanvasRenderingContext2D { 1596 readonly attribute OffscreenCanvas canvas; 1597 }; 1598 1599 OffscreenCanvasRenderingContext2D includes CanvasSettings; 1600 OffscreenCanvasRenderingContext2D includes CanvasState; 1601 OffscreenCanvasRenderingContext2D includes CanvasTransform; 1602 OffscreenCanvasRenderingContext2D includes CanvasCompositing; 1603 OffscreenCanvasRenderingContext2D includes CanvasImageSmoothing; 1604 OffscreenCanvasRenderingContext2D includes CanvasFillStrokeStyles; 1605 OffscreenCanvasRenderingContext2D includes CanvasShadowStyles; 1606 OffscreenCanvasRenderingContext2D includes CanvasFilters; 1607 OffscreenCanvasRenderingContext2D includes CanvasRect; 1608 OffscreenCanvasRenderingContext2D includes CanvasDrawPath; 1609 OffscreenCanvasRenderingContext2D includes CanvasText; 1610 OffscreenCanvasRenderingContext2D includes CanvasDrawImage; 1611 OffscreenCanvasRenderingContext2D includes CanvasImageData; 1612 OffscreenCanvasRenderingContext2D includes CanvasPathDrawingStyles; 1613 OffscreenCanvasRenderingContext2D includes CanvasTextDrawingStyles; 1614 OffscreenCanvasRenderingContext2D includes CanvasPath; 1615 1616 enum PredefinedColorSpace { "srgb", "srgb-linear", "display-p3", "display-p3-linear" }; 1617 1618 [Exposed=Window] 1619 interface CustomElementRegistry { 1620 constructor(); 1621 1622 [CEReactions] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); 1623 (CustomElementConstructor or undefined) get(DOMString name); 1624 DOMString? getName(CustomElementConstructor constructor); 1625 Promise<CustomElementConstructor> whenDefined(DOMString name); 1626 [CEReactions] undefined upgrade(Node root); 1627 [CEReactions] undefined initialize(Node root); 1628 }; 1629 1630 callback CustomElementConstructor = HTMLElement (); 1631 1632 dictionary ElementDefinitionOptions { 1633 DOMString extends; 1634 }; 1635 1636 [Exposed=Window] 1637 interface ElementInternals { 1638 // Shadow root access 1639 readonly attribute ShadowRoot? shadowRoot; 1640 1641 // Form-associated custom elements 1642 undefined setFormValue((File or USVString or FormData)? value, 1643 optional (File or USVString or FormData)? state); 1644 1645 readonly attribute HTMLFormElement? form; 1646 1647 undefined setValidity(optional ValidityStateFlags flags = {}, 1648 optional DOMString message, 1649 optional HTMLElement anchor); 1650 readonly attribute boolean willValidate; 1651 readonly attribute ValidityState validity; 1652 readonly attribute DOMString validationMessage; 1653 boolean checkValidity(); 1654 boolean reportValidity(); 1655 1656 readonly attribute NodeList labels; 1657 1658 // Custom state pseudo-class 1659 [SameObject] readonly attribute CustomStateSet states; 1660 }; 1661 1662 // Accessibility semantics 1663 ElementInternals includes ARIAMixin; 1664 1665 dictionary ValidityStateFlags { 1666 boolean valueMissing = false; 1667 boolean typeMismatch = false; 1668 boolean patternMismatch = false; 1669 boolean tooLong = false; 1670 boolean tooShort = false; 1671 boolean rangeUnderflow = false; 1672 boolean rangeOverflow = false; 1673 boolean stepMismatch = false; 1674 boolean badInput = false; 1675 boolean customError = false; 1676 }; 1677 1678 [Exposed=Window] 1679 interface CustomStateSet { 1680 setlike<DOMString>; 1681 }; 1682 1683 [Exposed=(Window)] 1684 interface VisibilityStateEntry : PerformanceEntry { 1685 readonly attribute DOMString name; // shadows inherited name 1686 readonly attribute DOMString entryType; // shadows inherited entryType 1687 readonly attribute DOMHighResTimeStamp startTime; // shadows inherited startTime 1688 readonly attribute unsigned long duration; // shadows inherited duration 1689 }; 1690 1691 [Exposed=Window] 1692 interface UserActivation { 1693 readonly attribute boolean hasBeenActive; 1694 readonly attribute boolean isActive; 1695 }; 1696 1697 partial interface Navigator { 1698 [SameObject] readonly attribute UserActivation userActivation; 1699 }; 1700 1701 [Exposed=Window] 1702 interface ToggleEvent : Event { 1703 constructor(DOMString type, optional ToggleEventInit eventInitDict = {}); 1704 readonly attribute DOMString oldState; 1705 readonly attribute DOMString newState; 1706 readonly attribute Element? source; 1707 }; 1708 1709 dictionary ToggleEventInit : EventInit { 1710 DOMString oldState = ""; 1711 DOMString newState = ""; 1712 Element? source = null; 1713 }; 1714 1715 [Exposed=Window] 1716 interface CommandEvent : Event { 1717 constructor(DOMString type, optional CommandEventInit eventInitDict = {}); 1718 readonly attribute Element? source; 1719 readonly attribute DOMString command; 1720 }; 1721 1722 dictionary CommandEventInit : EventInit { 1723 Element? source = null; 1724 DOMString command = ""; 1725 }; 1726 1727 dictionary FocusOptions { 1728 boolean preventScroll = false; 1729 boolean focusVisible; 1730 }; 1731 1732 interface mixin ElementContentEditable { 1733 [CEReactions] attribute DOMString contentEditable; 1734 [CEReactions] attribute DOMString enterKeyHint; 1735 readonly attribute boolean isContentEditable; 1736 [CEReactions] attribute DOMString inputMode; 1737 }; 1738 1739 [Exposed=Window] 1740 interface CloseWatcher : EventTarget { 1741 constructor(optional CloseWatcherOptions options = {}); 1742 1743 undefined requestClose(); 1744 undefined close(); 1745 undefined destroy(); 1746 1747 attribute EventHandler oncancel; 1748 attribute EventHandler onclose; 1749 }; 1750 1751 dictionary CloseWatcherOptions { 1752 AbortSignal signal; 1753 }; 1754 1755 [Exposed=Window] 1756 interface DataTransfer { 1757 constructor(); 1758 1759 attribute DOMString dropEffect; 1760 attribute DOMString effectAllowed; 1761 1762 [SameObject] readonly attribute DataTransferItemList items; 1763 1764 undefined setDragImage(Element image, long x, long y); 1765 1766 /* old interface */ 1767 readonly attribute FrozenArray<DOMString> types; 1768 DOMString getData(DOMString format); 1769 undefined setData(DOMString format, DOMString data); 1770 undefined clearData(optional DOMString format); 1771 [SameObject] readonly attribute FileList files; 1772 }; 1773 1774 [Exposed=Window] 1775 interface DataTransferItemList { 1776 readonly attribute unsigned long length; 1777 getter DataTransferItem (unsigned long index); 1778 DataTransferItem? add(DOMString data, DOMString type); 1779 DataTransferItem? add(File data); 1780 undefined remove(unsigned long index); 1781 undefined clear(); 1782 }; 1783 1784 [Exposed=Window] 1785 interface DataTransferItem { 1786 readonly attribute DOMString kind; 1787 readonly attribute DOMString type; 1788 undefined getAsString(FunctionStringCallback? _callback); 1789 File? getAsFile(); 1790 }; 1791 1792 callback FunctionStringCallback = undefined (DOMString data); 1793 1794 [Exposed=Window] 1795 interface DragEvent : MouseEvent { 1796 constructor(DOMString type, optional DragEventInit eventInitDict = {}); 1797 1798 readonly attribute DataTransfer? dataTransfer; 1799 }; 1800 1801 dictionary DragEventInit : MouseEventInit { 1802 DataTransfer? dataTransfer = null; 1803 }; 1804 1805 interface mixin PopoverTargetAttributes { 1806 [CEReactions, Reflect] attribute Element? popoverTargetElement; 1807 [CEReactions] attribute DOMString popoverTargetAction; 1808 }; 1809 1810 [Exposed=*] 1811 interface Origin { 1812 constructor(); 1813 1814 static Origin from(any value); 1815 1816 readonly attribute boolean opaque; 1817 1818 boolean isSameOrigin(Origin other); 1819 boolean isSameSite(Origin other); 1820 }; 1821 1822 [Global=Window, 1823 Exposed=Window, 1824 LegacyUnenumerableNamedProperties] 1825 interface Window : EventTarget { 1826 // the current browsing context 1827 [LegacyUnforgeable] readonly attribute WindowProxy window; 1828 [Replaceable] readonly attribute WindowProxy self; 1829 [LegacyUnforgeable] readonly attribute Document document; 1830 attribute DOMString name; 1831 [PutForwards=href, LegacyUnforgeable] readonly attribute Location location; 1832 readonly attribute History history; 1833 [Replaceable] readonly attribute Navigation navigation; 1834 readonly attribute CustomElementRegistry customElements; 1835 [Replaceable] readonly attribute BarProp locationbar; 1836 [Replaceable] readonly attribute BarProp menubar; 1837 [Replaceable] readonly attribute BarProp personalbar; 1838 [Replaceable] readonly attribute BarProp scrollbars; 1839 [Replaceable] readonly attribute BarProp statusbar; 1840 [Replaceable] readonly attribute BarProp toolbar; 1841 attribute DOMString status; 1842 undefined close(); 1843 readonly attribute boolean closed; 1844 undefined stop(); 1845 undefined focus(); 1846 undefined blur(); 1847 1848 // other browsing contexts 1849 [Replaceable] readonly attribute WindowProxy frames; 1850 [Replaceable] readonly attribute unsigned long length; 1851 [LegacyUnforgeable] readonly attribute WindowProxy? top; 1852 attribute any opener; 1853 [Replaceable] readonly attribute WindowProxy? parent; 1854 readonly attribute Element? frameElement; 1855 WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [LegacyNullToEmptyString] DOMString features = ""); 1856 1857 // Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic 1858 // object on the prototype chain. Indeed, this does not make the global object an exotic object. 1859 // Indexed access is taken care of by the WindowProxy exotic object. 1860 getter object (DOMString name); 1861 1862 // the user agent 1863 readonly attribute Navigator navigator; 1864 [Replaceable] readonly attribute Navigator clientInformation; // legacy alias of .navigator 1865 readonly attribute boolean originAgentCluster; 1866 1867 // user prompts 1868 undefined alert(); 1869 undefined alert(DOMString message); 1870 boolean confirm(optional DOMString message = ""); 1871 DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); 1872 undefined print(); 1873 1874 undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); 1875 undefined postMessage(any message, optional WindowPostMessageOptions options = {}); 1876 1877 // also has obsolete members 1878 }; 1879 Window includes GlobalEventHandlers; 1880 Window includes WindowEventHandlers; 1881 1882 dictionary WindowPostMessageOptions : StructuredSerializeOptions { 1883 USVString targetOrigin = "/"; 1884 }; 1885 1886 [Exposed=Window] 1887 interface BarProp { 1888 readonly attribute boolean visible; 1889 }; 1890 1891 [Exposed=Window] 1892 interface Location { // but see also additional creation steps and overridden internal methods 1893 [LegacyUnforgeable] stringifier attribute USVString href; 1894 [LegacyUnforgeable] readonly attribute USVString origin; 1895 [LegacyUnforgeable] attribute USVString protocol; 1896 [LegacyUnforgeable] attribute USVString host; 1897 [LegacyUnforgeable] attribute USVString hostname; 1898 [LegacyUnforgeable] attribute USVString port; 1899 [LegacyUnforgeable] attribute USVString pathname; 1900 [LegacyUnforgeable] attribute USVString search; 1901 [LegacyUnforgeable] attribute USVString hash; 1902 1903 [LegacyUnforgeable] undefined assign(USVString url); 1904 [LegacyUnforgeable] undefined replace(USVString url); 1905 [LegacyUnforgeable] undefined reload(); 1906 1907 [LegacyUnforgeable, SameObject] readonly attribute DOMStringList ancestorOrigins; 1908 }; 1909 1910 enum ScrollRestoration { "auto", "manual" }; 1911 1912 [Exposed=Window] 1913 interface History { 1914 readonly attribute unsigned long length; 1915 attribute ScrollRestoration scrollRestoration; 1916 readonly attribute any state; 1917 undefined go(optional long delta = 0); 1918 undefined back(); 1919 undefined forward(); 1920 undefined pushState(any data, DOMString unused, optional USVString? url = null); 1921 undefined replaceState(any data, DOMString unused, optional USVString? url = null); 1922 }; 1923 1924 [Exposed=Window] 1925 interface Navigation : EventTarget { 1926 sequence<NavigationHistoryEntry> entries(); 1927 readonly attribute NavigationHistoryEntry? currentEntry; 1928 undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options); 1929 readonly attribute NavigationTransition? transition; 1930 readonly attribute NavigationActivation? activation; 1931 1932 readonly attribute boolean canGoBack; 1933 readonly attribute boolean canGoForward; 1934 1935 NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {}); 1936 NavigationResult reload(optional NavigationReloadOptions options = {}); 1937 1938 NavigationResult traverseTo(DOMString key, optional NavigationOptions options = {}); 1939 NavigationResult back(optional NavigationOptions options = {}); 1940 NavigationResult forward(optional NavigationOptions options = {}); 1941 1942 attribute EventHandler onnavigate; 1943 attribute EventHandler onnavigatesuccess; 1944 attribute EventHandler onnavigateerror; 1945 attribute EventHandler oncurrententrychange; 1946 }; 1947 1948 dictionary NavigationUpdateCurrentEntryOptions { 1949 required any state; 1950 }; 1951 1952 dictionary NavigationOptions { 1953 any info; 1954 }; 1955 1956 dictionary NavigationNavigateOptions : NavigationOptions { 1957 any state; 1958 NavigationHistoryBehavior history = "auto"; 1959 }; 1960 1961 dictionary NavigationReloadOptions : NavigationOptions { 1962 any state; 1963 }; 1964 1965 dictionary NavigationResult { 1966 Promise<NavigationHistoryEntry> committed; 1967 Promise<NavigationHistoryEntry> finished; 1968 }; 1969 1970 enum NavigationHistoryBehavior { 1971 "auto", 1972 "push", 1973 "replace" 1974 }; 1975 1976 enum NavigationType { 1977 "push", 1978 "replace", 1979 "reload", 1980 "traverse" 1981 }; 1982 1983 [Exposed=Window] 1984 interface NavigationHistoryEntry : EventTarget { 1985 readonly attribute USVString? url; 1986 readonly attribute DOMString key; 1987 readonly attribute DOMString id; 1988 readonly attribute long long index; 1989 readonly attribute boolean sameDocument; 1990 1991 any getState(); 1992 1993 attribute EventHandler ondispose; 1994 }; 1995 1996 [Exposed=Window] 1997 interface NavigationTransition { 1998 readonly attribute NavigationType navigationType; 1999 readonly attribute NavigationHistoryEntry from; 2000 readonly attribute NavigationDestination to; 2001 readonly attribute Promise<undefined> committed; 2002 readonly attribute Promise<undefined> finished; 2003 }; 2004 2005 [Exposed=Window] 2006 interface NavigationActivation { 2007 readonly attribute NavigationHistoryEntry? from; 2008 readonly attribute NavigationHistoryEntry entry; 2009 readonly attribute NavigationType navigationType; 2010 }; 2011 2012 [Exposed=Window] 2013 interface NavigateEvent : Event { 2014 constructor(DOMString type, NavigateEventInit eventInitDict); 2015 2016 readonly attribute NavigationType navigationType; 2017 readonly attribute NavigationDestination destination; 2018 readonly attribute boolean canIntercept; 2019 readonly attribute boolean userInitiated; 2020 readonly attribute boolean hashChange; 2021 readonly attribute AbortSignal signal; 2022 readonly attribute FormData? formData; 2023 readonly attribute DOMString? downloadRequest; 2024 readonly attribute any info; 2025 readonly attribute boolean hasUAVisualTransition; 2026 readonly attribute Element? sourceElement; 2027 2028 undefined intercept(optional NavigationInterceptOptions options = {}); 2029 undefined scroll(); 2030 }; 2031 2032 dictionary NavigateEventInit : EventInit { 2033 NavigationType navigationType = "push"; 2034 required NavigationDestination destination; 2035 boolean canIntercept = false; 2036 boolean userInitiated = false; 2037 boolean hashChange = false; 2038 required AbortSignal signal; 2039 FormData? formData = null; 2040 DOMString? downloadRequest = null; 2041 any info; 2042 boolean hasUAVisualTransition = false; 2043 Element? sourceElement = null; 2044 }; 2045 2046 dictionary NavigationInterceptOptions { 2047 NavigationPrecommitHandler precommitHandler; 2048 NavigationInterceptHandler handler; 2049 NavigationFocusReset focusReset; 2050 NavigationScrollBehavior scroll; 2051 }; 2052 2053 enum NavigationFocusReset { 2054 "after-transition", 2055 "manual" 2056 }; 2057 2058 enum NavigationScrollBehavior { 2059 "after-transition", 2060 "manual" 2061 }; 2062 2063 callback NavigationInterceptHandler = Promise<undefined> (); 2064 2065 [Exposed=Window] 2066 interface NavigationPrecommitController { 2067 undefined redirect(USVString url, optional NavigationNavigateOptions options = {}); 2068 undefined addHandler(NavigationInterceptHandler handler); 2069 }; 2070 2071 callback NavigationPrecommitHandler = Promise<undefined> (NavigationPrecommitController controller); 2072 2073 [Exposed=Window] 2074 interface NavigationDestination { 2075 readonly attribute USVString url; 2076 readonly attribute DOMString key; 2077 readonly attribute DOMString id; 2078 readonly attribute long long index; 2079 readonly attribute boolean sameDocument; 2080 2081 any getState(); 2082 }; 2083 2084 [Exposed=Window] 2085 interface NavigationCurrentEntryChangeEvent : Event { 2086 constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict); 2087 2088 readonly attribute NavigationType? navigationType; 2089 readonly attribute NavigationHistoryEntry from; 2090 }; 2091 2092 dictionary NavigationCurrentEntryChangeEventInit : EventInit { 2093 NavigationType? navigationType = null; 2094 required NavigationHistoryEntry from; 2095 }; 2096 2097 [Exposed=Window] 2098 interface PopStateEvent : Event { 2099 constructor(DOMString type, optional PopStateEventInit eventInitDict = {}); 2100 2101 readonly attribute any state; 2102 readonly attribute boolean hasUAVisualTransition; 2103 }; 2104 2105 dictionary PopStateEventInit : EventInit { 2106 any state = null; 2107 boolean hasUAVisualTransition = false; 2108 }; 2109 2110 [Exposed=Window] 2111 interface HashChangeEvent : Event { 2112 constructor(DOMString type, optional HashChangeEventInit eventInitDict = {}); 2113 2114 readonly attribute USVString oldURL; 2115 readonly attribute USVString newURL; 2116 }; 2117 2118 dictionary HashChangeEventInit : EventInit { 2119 USVString oldURL = ""; 2120 USVString newURL = ""; 2121 }; 2122 2123 [Exposed=Window] 2124 interface PageSwapEvent : Event { 2125 constructor(DOMString type, optional PageSwapEventInit eventInitDict = {}); 2126 readonly attribute NavigationActivation? activation; 2127 readonly attribute ViewTransition? viewTransition; 2128 }; 2129 2130 dictionary PageSwapEventInit : EventInit { 2131 NavigationActivation? activation = null; 2132 ViewTransition? viewTransition = null; 2133 }; 2134 2135 [Exposed=Window] 2136 interface PageRevealEvent : Event { 2137 constructor(DOMString type, optional PageRevealEventInit eventInitDict = {}); 2138 readonly attribute ViewTransition? viewTransition; 2139 }; 2140 2141 dictionary PageRevealEventInit : EventInit { 2142 ViewTransition? viewTransition = null; 2143 }; 2144 2145 [Exposed=Window] 2146 interface PageTransitionEvent : Event { 2147 constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {}); 2148 2149 readonly attribute boolean persisted; 2150 }; 2151 2152 dictionary PageTransitionEventInit : EventInit { 2153 boolean persisted = false; 2154 }; 2155 2156 [Exposed=Window] 2157 interface BeforeUnloadEvent : Event { 2158 attribute DOMString returnValue; 2159 }; 2160 2161 [Exposed=Window] 2162 interface NotRestoredReasonDetails { 2163 readonly attribute DOMString reason; 2164 [Default] object toJSON(); 2165 }; 2166 2167 [Exposed=Window] 2168 interface NotRestoredReasons { 2169 readonly attribute USVString? src; 2170 readonly attribute DOMString? id; 2171 readonly attribute DOMString? name; 2172 readonly attribute USVString? url; 2173 readonly attribute FrozenArray<NotRestoredReasonDetails>? reasons; 2174 readonly attribute FrozenArray<NotRestoredReasons>? children; 2175 [Default] object toJSON(); 2176 }; 2177 2178 [Exposed=*] 2179 interface ErrorEvent : Event { 2180 constructor(DOMString type, optional ErrorEventInit eventInitDict = {}); 2181 2182 readonly attribute DOMString message; 2183 readonly attribute USVString filename; 2184 readonly attribute unsigned long lineno; 2185 readonly attribute unsigned long colno; 2186 readonly attribute any error; 2187 }; 2188 2189 dictionary ErrorEventInit : EventInit { 2190 DOMString message = ""; 2191 USVString filename = ""; 2192 unsigned long lineno = 0; 2193 unsigned long colno = 0; 2194 any error; 2195 }; 2196 2197 [Exposed=*] 2198 interface PromiseRejectionEvent : Event { 2199 constructor(DOMString type, PromiseRejectionEventInit eventInitDict); 2200 2201 readonly attribute object promise; 2202 readonly attribute any reason; 2203 }; 2204 2205 dictionary PromiseRejectionEventInit : EventInit { 2206 required object promise; 2207 any reason; 2208 }; 2209 2210 [LegacyTreatNonObjectAsNull] 2211 callback EventHandlerNonNull = any (Event event); 2212 typedef EventHandlerNonNull? EventHandler; 2213 2214 [LegacyTreatNonObjectAsNull] 2215 callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long colno, optional any error); 2216 typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; 2217 2218 [LegacyTreatNonObjectAsNull] 2219 callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event); 2220 typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; 2221 2222 interface mixin GlobalEventHandlers { 2223 attribute EventHandler onabort; 2224 attribute EventHandler onauxclick; 2225 attribute EventHandler onbeforeinput; 2226 attribute EventHandler onbeforematch; 2227 attribute EventHandler onbeforetoggle; 2228 attribute EventHandler onblur; 2229 attribute EventHandler oncancel; 2230 attribute EventHandler oncanplay; 2231 attribute EventHandler oncanplaythrough; 2232 attribute EventHandler onchange; 2233 attribute EventHandler onclick; 2234 attribute EventHandler onclose; 2235 attribute EventHandler oncommand; 2236 attribute EventHandler oncontextlost; 2237 attribute EventHandler oncontextmenu; 2238 attribute EventHandler oncontextrestored; 2239 attribute EventHandler oncopy; 2240 attribute EventHandler oncuechange; 2241 attribute EventHandler oncut; 2242 attribute EventHandler ondblclick; 2243 attribute EventHandler ondrag; 2244 attribute EventHandler ondragend; 2245 attribute EventHandler ondragenter; 2246 attribute EventHandler ondragleave; 2247 attribute EventHandler ondragover; 2248 attribute EventHandler ondragstart; 2249 attribute EventHandler ondrop; 2250 attribute EventHandler ondurationchange; 2251 attribute EventHandler onemptied; 2252 attribute EventHandler onended; 2253 attribute OnErrorEventHandler onerror; 2254 attribute EventHandler onfocus; 2255 attribute EventHandler onformdata; 2256 attribute EventHandler oninput; 2257 attribute EventHandler oninvalid; 2258 attribute EventHandler onkeydown; 2259 attribute EventHandler onkeypress; 2260 attribute EventHandler onkeyup; 2261 attribute EventHandler onload; 2262 attribute EventHandler onloadeddata; 2263 attribute EventHandler onloadedmetadata; 2264 attribute EventHandler onloadstart; 2265 attribute EventHandler onmousedown; 2266 [LegacyLenientThis] attribute EventHandler onmouseenter; 2267 [LegacyLenientThis] attribute EventHandler onmouseleave; 2268 attribute EventHandler onmousemove; 2269 attribute EventHandler onmouseout; 2270 attribute EventHandler onmouseover; 2271 attribute EventHandler onmouseup; 2272 attribute EventHandler onpaste; 2273 attribute EventHandler onpause; 2274 attribute EventHandler onplay; 2275 attribute EventHandler onplaying; 2276 attribute EventHandler onprogress; 2277 attribute EventHandler onratechange; 2278 attribute EventHandler onreset; 2279 attribute EventHandler onresize; 2280 attribute EventHandler onscroll; 2281 attribute EventHandler onscrollend; 2282 attribute EventHandler onsecuritypolicyviolation; 2283 attribute EventHandler onseeked; 2284 attribute EventHandler onseeking; 2285 attribute EventHandler onselect; 2286 attribute EventHandler onslotchange; 2287 attribute EventHandler onstalled; 2288 attribute EventHandler onsubmit; 2289 attribute EventHandler onsuspend; 2290 attribute EventHandler ontimeupdate; 2291 attribute EventHandler ontoggle; 2292 attribute EventHandler onvolumechange; 2293 attribute EventHandler onwaiting; 2294 attribute EventHandler onwebkitanimationend; 2295 attribute EventHandler onwebkitanimationiteration; 2296 attribute EventHandler onwebkitanimationstart; 2297 attribute EventHandler onwebkittransitionend; 2298 attribute EventHandler onwheel; 2299 }; 2300 2301 interface mixin WindowEventHandlers { 2302 attribute EventHandler onafterprint; 2303 attribute EventHandler onbeforeprint; 2304 attribute OnBeforeUnloadEventHandler onbeforeunload; 2305 attribute EventHandler onhashchange; 2306 attribute EventHandler onlanguagechange; 2307 attribute EventHandler onmessage; 2308 attribute EventHandler onmessageerror; 2309 attribute EventHandler onoffline; 2310 attribute EventHandler ononline; 2311 attribute EventHandler onpagehide; 2312 attribute EventHandler onpagereveal; 2313 attribute EventHandler onpageshow; 2314 attribute EventHandler onpageswap; 2315 attribute EventHandler onpopstate; 2316 attribute EventHandler onrejectionhandled; 2317 attribute EventHandler onstorage; 2318 attribute EventHandler onunhandledrejection; 2319 attribute EventHandler onunload; 2320 }; 2321 2322 typedef (DOMString or Function or TrustedScript) TimerHandler; 2323 2324 interface mixin WindowOrWorkerGlobalScope { 2325 [Replaceable] readonly attribute USVString origin; 2326 readonly attribute boolean isSecureContext; 2327 readonly attribute boolean crossOriginIsolated; 2328 2329 undefined reportError(any e); 2330 2331 // base64 utility methods 2332 DOMString btoa(DOMString data); 2333 ByteString atob(DOMString data); 2334 2335 // timers 2336 long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); 2337 undefined clearTimeout(optional long id = 0); 2338 long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); 2339 undefined clearInterval(optional long id = 0); 2340 2341 // microtask queuing 2342 undefined queueMicrotask(VoidFunction callback); 2343 2344 // ImageBitmap 2345 Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); 2346 Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {}); 2347 2348 // structured cloning 2349 any structuredClone(any value, optional StructuredSerializeOptions options = {}); 2350 }; 2351 Window includes WindowOrWorkerGlobalScope; 2352 WorkerGlobalScope includes WindowOrWorkerGlobalScope; 2353 2354 partial interface Element { 2355 [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html); 2356 DOMString getHTML(optional GetHTMLOptions options = {}); 2357 2358 [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML; 2359 [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) outerHTML; 2360 [CEReactions] undefined insertAdjacentHTML(DOMString position, (TrustedHTML or DOMString) string); 2361 }; 2362 2363 partial interface ShadowRoot { 2364 [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html); 2365 DOMString getHTML(optional GetHTMLOptions options = {}); 2366 2367 [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML; 2368 }; 2369 2370 dictionary GetHTMLOptions { 2371 boolean serializableShadowRoots = false; 2372 sequence<ShadowRoot> shadowRoots = []; 2373 }; 2374 2375 [Exposed=Window] 2376 interface DOMParser { 2377 constructor(); 2378 2379 [NewObject] Document parseFromString((TrustedHTML or DOMString) string, DOMParserSupportedType type); 2380 }; 2381 2382 enum DOMParserSupportedType { 2383 "text/html", 2384 "text/xml", 2385 "application/xml", 2386 "application/xhtml+xml", 2387 "image/svg+xml" 2388 }; 2389 2390 partial interface Range { 2391 [CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string); 2392 }; 2393 2394 [Exposed=Window] 2395 interface XMLSerializer { 2396 constructor(); 2397 2398 DOMString serializeToString(Node root); 2399 }; 2400 2401 [Exposed=Window] 2402 interface Navigator { 2403 // objects implementing this interface also implement the interfaces given below 2404 }; 2405 Navigator includes NavigatorID; 2406 Navigator includes NavigatorLanguage; 2407 Navigator includes NavigatorOnLine; 2408 Navigator includes NavigatorContentUtils; 2409 Navigator includes NavigatorCookies; 2410 Navigator includes NavigatorPlugins; 2411 Navigator includes NavigatorConcurrentHardware; 2412 2413 interface mixin NavigatorID { 2414 readonly attribute DOMString appCodeName; // constant "Mozilla" 2415 readonly attribute DOMString appName; // constant "Netscape" 2416 readonly attribute DOMString appVersion; 2417 readonly attribute DOMString platform; 2418 readonly attribute DOMString product; // constant "Gecko" 2419 [Exposed=Window] readonly attribute DOMString productSub; 2420 readonly attribute DOMString userAgent; 2421 [Exposed=Window] readonly attribute DOMString vendor; 2422 [Exposed=Window] readonly attribute DOMString vendorSub; // constant "" 2423 }; 2424 2425 partial interface mixin NavigatorID { 2426 [Exposed=Window] boolean taintEnabled(); // constant false 2427 [Exposed=Window] readonly attribute DOMString oscpu; 2428 }; 2429 2430 interface mixin NavigatorLanguage { 2431 readonly attribute DOMString language; 2432 readonly attribute FrozenArray<DOMString> languages; 2433 }; 2434 2435 interface mixin NavigatorOnLine { 2436 readonly attribute boolean onLine; 2437 }; 2438 2439 interface mixin NavigatorContentUtils { 2440 [SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url); 2441 [SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url); 2442 }; 2443 2444 interface mixin NavigatorCookies { 2445 readonly attribute boolean cookieEnabled; 2446 }; 2447 2448 interface mixin NavigatorPlugins { 2449 [SameObject] readonly attribute PluginArray plugins; 2450 [SameObject] readonly attribute MimeTypeArray mimeTypes; 2451 boolean javaEnabled(); 2452 readonly attribute boolean pdfViewerEnabled; 2453 }; 2454 2455 [Exposed=Window, 2456 LegacyUnenumerableNamedProperties] 2457 interface PluginArray { 2458 undefined refresh(); 2459 readonly attribute unsigned long length; 2460 getter Plugin? item(unsigned long index); 2461 getter Plugin? namedItem(DOMString name); 2462 }; 2463 2464 [Exposed=Window, 2465 LegacyUnenumerableNamedProperties] 2466 interface MimeTypeArray { 2467 readonly attribute unsigned long length; 2468 getter MimeType? item(unsigned long index); 2469 getter MimeType? namedItem(DOMString name); 2470 }; 2471 2472 [Exposed=Window, 2473 LegacyUnenumerableNamedProperties] 2474 interface Plugin { 2475 readonly attribute DOMString name; 2476 readonly attribute DOMString description; 2477 readonly attribute DOMString filename; 2478 readonly attribute unsigned long length; 2479 getter MimeType? item(unsigned long index); 2480 getter MimeType? namedItem(DOMString name); 2481 }; 2482 2483 [Exposed=Window] 2484 interface MimeType { 2485 readonly attribute DOMString type; 2486 readonly attribute DOMString description; 2487 readonly attribute DOMString suffixes; 2488 readonly attribute Plugin enabledPlugin; 2489 }; 2490 2491 typedef (Uint8ClampedArray or Float16Array) ImageDataArray; 2492 2493 enum ImageDataPixelFormat { "rgba-unorm8", "rgba-float16" }; 2494 2495 dictionary ImageDataSettings { 2496 PredefinedColorSpace colorSpace; 2497 ImageDataPixelFormat pixelFormat = "rgba-unorm8"; 2498 }; 2499 2500 [Exposed=(Window,Worker), 2501 Serializable] 2502 interface ImageData { 2503 constructor(unsigned long sw, unsigned long sh, optional ImageDataSettings settings = {}); 2504 constructor(ImageDataArray data, unsigned long sw, optional unsigned long sh, optional ImageDataSettings settings = {}); 2505 2506 readonly attribute unsigned long width; 2507 readonly attribute unsigned long height; 2508 readonly attribute ImageDataArray data; 2509 readonly attribute ImageDataPixelFormat pixelFormat; 2510 readonly attribute PredefinedColorSpace colorSpace; 2511 }; 2512 2513 [Exposed=(Window,Worker), Serializable, Transferable] 2514 interface ImageBitmap { 2515 readonly attribute unsigned long width; 2516 readonly attribute unsigned long height; 2517 undefined close(); 2518 }; 2519 2520 typedef (CanvasImageSource or 2521 Blob or 2522 ImageData) ImageBitmapSource; 2523 2524 enum ImageOrientation { "from-image", "flipY" }; 2525 enum PremultiplyAlpha { "none", "premultiply", "default" }; 2526 enum ColorSpaceConversion { "none", "default" }; 2527 enum ResizeQuality { "pixelated", "low", "medium", "high" }; 2528 2529 dictionary ImageBitmapOptions { 2530 ImageOrientation imageOrientation = "from-image"; 2531 PremultiplyAlpha premultiplyAlpha = "default"; 2532 ColorSpaceConversion colorSpaceConversion = "default"; 2533 [EnforceRange] unsigned long resizeWidth; 2534 [EnforceRange] unsigned long resizeHeight; 2535 ResizeQuality resizeQuality = "low"; 2536 }; 2537 2538 callback FrameRequestCallback = undefined (DOMHighResTimeStamp time); 2539 2540 interface mixin AnimationFrameProvider { 2541 unsigned long requestAnimationFrame(FrameRequestCallback callback); 2542 undefined cancelAnimationFrame(unsigned long handle); 2543 }; 2544 Window includes AnimationFrameProvider; 2545 DedicatedWorkerGlobalScope includes AnimationFrameProvider; 2546 2547 [Exposed=(Window,Worker,AudioWorklet)] 2548 interface MessageEvent : Event { 2549 constructor(DOMString type, optional MessageEventInit eventInitDict = {}); 2550 2551 readonly attribute any data; 2552 readonly attribute USVString origin; 2553 readonly attribute DOMString lastEventId; 2554 readonly attribute MessageEventSource? source; 2555 readonly attribute FrozenArray<MessagePort> ports; 2556 2557 undefined initMessageEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any data = null, optional USVString origin = "", optional DOMString lastEventId = "", optional MessageEventSource? source = null, optional sequence<MessagePort> ports = []); 2558 }; 2559 2560 dictionary MessageEventInit : EventInit { 2561 any data = null; 2562 USVString origin = ""; 2563 DOMString lastEventId = ""; 2564 MessageEventSource? source = null; 2565 sequence<MessagePort> ports = []; 2566 }; 2567 2568 typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource; 2569 2570 [Exposed=(Window,Worker)] 2571 interface EventSource : EventTarget { 2572 constructor(USVString url, optional EventSourceInit eventSourceInitDict = {}); 2573 2574 readonly attribute USVString url; 2575 readonly attribute boolean withCredentials; 2576 2577 // ready state 2578 const unsigned short CONNECTING = 0; 2579 const unsigned short OPEN = 1; 2580 const unsigned short CLOSED = 2; 2581 readonly attribute unsigned short readyState; 2582 2583 // networking 2584 attribute EventHandler onopen; 2585 attribute EventHandler onmessage; 2586 attribute EventHandler onerror; 2587 undefined close(); 2588 }; 2589 2590 dictionary EventSourceInit { 2591 boolean withCredentials = false; 2592 }; 2593 2594 [Exposed=(Window,Worker)] 2595 interface MessageChannel { 2596 constructor(); 2597 2598 readonly attribute MessagePort port1; 2599 readonly attribute MessagePort port2; 2600 }; 2601 2602 interface mixin MessageEventTarget { 2603 attribute EventHandler onmessage; 2604 attribute EventHandler onmessageerror; 2605 }; 2606 2607 [Exposed=(Window,Worker,AudioWorklet), Transferable] 2608 interface MessagePort : EventTarget { 2609 undefined postMessage(any message, sequence<object> transfer); 2610 undefined postMessage(any message, optional StructuredSerializeOptions options = {}); 2611 undefined start(); 2612 undefined close(); 2613 2614 // event handlers 2615 attribute EventHandler onclose; 2616 }; 2617 2618 MessagePort includes MessageEventTarget; 2619 2620 dictionary StructuredSerializeOptions { 2621 sequence<object> transfer = []; 2622 }; 2623 2624 [Exposed=(Window,Worker)] 2625 interface BroadcastChannel : EventTarget { 2626 constructor(DOMString name); 2627 2628 readonly attribute DOMString name; 2629 undefined postMessage(any message); 2630 undefined close(); 2631 attribute EventHandler onmessage; 2632 attribute EventHandler onmessageerror; 2633 }; 2634 2635 [Exposed=Worker] 2636 interface WorkerGlobalScope : EventTarget { 2637 readonly attribute WorkerGlobalScope self; 2638 readonly attribute WorkerLocation location; 2639 readonly attribute WorkerNavigator navigator; 2640 undefined importScripts((TrustedScriptURL or USVString)... urls); 2641 2642 attribute OnErrorEventHandler onerror; 2643 attribute EventHandler onlanguagechange; 2644 attribute EventHandler onoffline; 2645 attribute EventHandler ononline; 2646 attribute EventHandler onrejectionhandled; 2647 attribute EventHandler onunhandledrejection; 2648 }; 2649 2650 [Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] 2651 interface DedicatedWorkerGlobalScope : WorkerGlobalScope { 2652 [Replaceable] readonly attribute DOMString name; 2653 2654 undefined postMessage(any message, sequence<object> transfer); 2655 undefined postMessage(any message, optional StructuredSerializeOptions options = {}); 2656 2657 undefined close(); 2658 }; 2659 2660 DedicatedWorkerGlobalScope includes MessageEventTarget; 2661 2662 [Global=(Worker,SharedWorker),Exposed=SharedWorker] 2663 interface SharedWorkerGlobalScope : WorkerGlobalScope { 2664 [Replaceable] readonly attribute DOMString name; 2665 2666 undefined close(); 2667 2668 attribute EventHandler onconnect; 2669 }; 2670 2671 interface mixin AbstractWorker { 2672 attribute EventHandler onerror; 2673 }; 2674 2675 [Exposed=(Window,DedicatedWorker,SharedWorker)] 2676 interface Worker : EventTarget { 2677 constructor((TrustedScriptURL or USVString) scriptURL, optional WorkerOptions options = {}); 2678 2679 undefined terminate(); 2680 2681 undefined postMessage(any message, sequence<object> transfer); 2682 undefined postMessage(any message, optional StructuredSerializeOptions options = {}); 2683 }; 2684 2685 dictionary WorkerOptions { 2686 DOMString name = ""; 2687 WorkerType type = "classic"; 2688 RequestCredentials credentials = "same-origin"; // credentials is only used if type is "module" 2689 }; 2690 2691 enum WorkerType { "classic", "module" }; 2692 2693 Worker includes AbstractWorker; 2694 Worker includes MessageEventTarget; 2695 2696 [Exposed=Window] 2697 interface SharedWorker : EventTarget { 2698 constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {}); 2699 2700 readonly attribute MessagePort port; 2701 }; 2702 SharedWorker includes AbstractWorker; 2703 2704 interface mixin NavigatorConcurrentHardware { 2705 readonly attribute unsigned long long hardwareConcurrency; 2706 }; 2707 2708 [Exposed=Worker] 2709 interface WorkerNavigator {}; 2710 WorkerNavigator includes NavigatorID; 2711 WorkerNavigator includes NavigatorLanguage; 2712 WorkerNavigator includes NavigatorOnLine; 2713 WorkerNavigator includes NavigatorConcurrentHardware; 2714 2715 [Exposed=Worker] 2716 interface WorkerLocation { 2717 stringifier readonly attribute USVString href; 2718 readonly attribute USVString origin; 2719 readonly attribute USVString protocol; 2720 readonly attribute USVString host; 2721 readonly attribute USVString hostname; 2722 readonly attribute USVString port; 2723 readonly attribute USVString pathname; 2724 readonly attribute USVString search; 2725 readonly attribute USVString hash; 2726 }; 2727 2728 [Exposed=Worklet, SecureContext] 2729 interface WorkletGlobalScope {}; 2730 2731 [Exposed=Window, SecureContext] 2732 interface Worklet { 2733 [NewObject] Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {}); 2734 }; 2735 2736 dictionary WorkletOptions { 2737 RequestCredentials credentials = "same-origin"; 2738 }; 2739 2740 [Exposed=Window] 2741 interface Storage { 2742 readonly attribute unsigned long length; 2743 DOMString? key(unsigned long index); 2744 getter DOMString? getItem(DOMString key); 2745 setter undefined setItem(DOMString key, DOMString value); 2746 deleter undefined removeItem(DOMString key); 2747 undefined clear(); 2748 }; 2749 2750 interface mixin WindowSessionStorage { 2751 readonly attribute Storage sessionStorage; 2752 }; 2753 Window includes WindowSessionStorage; 2754 2755 interface mixin WindowLocalStorage { 2756 readonly attribute Storage localStorage; 2757 }; 2758 Window includes WindowLocalStorage; 2759 2760 [Exposed=Window] 2761 interface StorageEvent : Event { 2762 constructor(DOMString type, optional StorageEventInit eventInitDict = {}); 2763 2764 readonly attribute DOMString? key; 2765 readonly attribute DOMString? oldValue; 2766 readonly attribute DOMString? newValue; 2767 readonly attribute USVString url; 2768 readonly attribute Storage? storageArea; 2769 2770 undefined initStorageEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional DOMString? key = null, optional DOMString? oldValue = null, optional DOMString? newValue = null, optional USVString url = "", optional Storage? storageArea = null); 2771 }; 2772 2773 dictionary StorageEventInit : EventInit { 2774 DOMString? key = null; 2775 DOMString? oldValue = null; 2776 DOMString? newValue = null; 2777 USVString url = ""; 2778 Storage? storageArea = null; 2779 }; 2780 2781 [Exposed=Window] 2782 interface HTMLMarqueeElement : HTMLElement { 2783 [HTMLConstructor] constructor(); 2784 2785 [CEReactions, Reflect] attribute DOMString behavior; 2786 [CEReactions, Reflect] attribute DOMString bgColor; 2787 [CEReactions, Reflect] attribute DOMString direction; 2788 [CEReactions, Reflect] attribute DOMString height; 2789 [CEReactions, Reflect] attribute unsigned long hspace; 2790 [CEReactions] attribute long loop; 2791 [CEReactions, Reflect, ReflectDefault=6] attribute unsigned long scrollAmount; 2792 [CEReactions, Reflect, ReflectDefault=85] attribute unsigned long scrollDelay; 2793 [CEReactions, Reflect] attribute boolean trueSpeed; 2794 [CEReactions, Reflect] attribute unsigned long vspace; 2795 [CEReactions, Reflect] attribute DOMString width; 2796 2797 undefined start(); 2798 undefined stop(); 2799 }; 2800 2801 [Exposed=Window] 2802 interface HTMLFrameSetElement : HTMLElement { 2803 [HTMLConstructor] constructor(); 2804 2805 [CEReactions, Reflect] attribute DOMString cols; 2806 [CEReactions, Reflect] attribute DOMString rows; 2807 }; 2808 HTMLFrameSetElement includes WindowEventHandlers; 2809 2810 [Exposed=Window] 2811 interface HTMLFrameElement : HTMLElement { 2812 [HTMLConstructor] constructor(); 2813 2814 [CEReactions, Reflect] attribute DOMString name; 2815 [CEReactions, Reflect] attribute DOMString scrolling; 2816 [CEReactions, ReflectURL] attribute USVString src; 2817 [CEReactions, Reflect] attribute DOMString frameBorder; 2818 [CEReactions, ReflectURL] attribute USVString longDesc; 2819 [CEReactions, Reflect] attribute boolean noResize; 2820 readonly attribute Document? contentDocument; 2821 readonly attribute WindowProxy? contentWindow; 2822 2823 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString marginHeight; 2824 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString marginWidth; 2825 }; 2826 2827 partial interface HTMLAnchorElement { 2828 [CEReactions, Reflect] attribute DOMString coords; 2829 [CEReactions, Reflect] attribute DOMString charset; 2830 [CEReactions, Reflect] attribute DOMString name; 2831 [CEReactions, Reflect] attribute DOMString rev; 2832 [CEReactions, Reflect] attribute DOMString shape; 2833 }; 2834 2835 partial interface HTMLAreaElement { 2836 [CEReactions, Reflect] attribute boolean noHref; 2837 }; 2838 2839 partial interface HTMLBodyElement { 2840 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString text; 2841 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString link; 2842 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString vLink; 2843 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString aLink; 2844 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString bgColor; 2845 [CEReactions, Reflect] attribute DOMString background; 2846 }; 2847 2848 partial interface HTMLBRElement { 2849 [CEReactions, Reflect] attribute DOMString clear; 2850 }; 2851 2852 partial interface HTMLTableCaptionElement { 2853 [CEReactions, Reflect] attribute DOMString align; 2854 }; 2855 2856 partial interface HTMLTableColElement { 2857 [CEReactions, Reflect] attribute DOMString align; 2858 [CEReactions, Reflect="char"] attribute DOMString ch; 2859 [CEReactions, Reflect="charoff"] attribute DOMString chOff; 2860 [CEReactions, Reflect] attribute DOMString vAlign; 2861 [CEReactions, Reflect] attribute DOMString width; 2862 }; 2863 2864 [Exposed=Window] 2865 interface HTMLDirectoryElement : HTMLElement { 2866 [HTMLConstructor] constructor(); 2867 2868 [CEReactions, Reflect] attribute boolean compact; 2869 }; 2870 2871 partial interface HTMLDivElement { 2872 [CEReactions, Reflect] attribute DOMString align; 2873 }; 2874 2875 partial interface HTMLDListElement { 2876 [CEReactions, Reflect] attribute boolean compact; 2877 }; 2878 2879 partial interface HTMLEmbedElement { 2880 [CEReactions, Reflect] attribute DOMString align; 2881 [CEReactions, Reflect] attribute DOMString name; 2882 }; 2883 2884 [Exposed=Window] 2885 interface HTMLFontElement : HTMLElement { 2886 [HTMLConstructor] constructor(); 2887 2888 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString color; 2889 [CEReactions, Reflect] attribute DOMString face; 2890 [CEReactions, Reflect] attribute DOMString size; 2891 }; 2892 2893 partial interface HTMLHeadingElement { 2894 [CEReactions, Reflect] attribute DOMString align; 2895 }; 2896 2897 partial interface HTMLHRElement { 2898 [CEReactions, Reflect] attribute DOMString align; 2899 [CEReactions, Reflect] attribute DOMString color; 2900 [CEReactions, Reflect] attribute boolean noShade; 2901 [CEReactions, Reflect] attribute DOMString size; 2902 [CEReactions, Reflect] attribute DOMString width; 2903 }; 2904 2905 partial interface HTMLHtmlElement { 2906 [CEReactions, Reflect] attribute DOMString version; 2907 }; 2908 2909 partial interface HTMLIFrameElement { 2910 [CEReactions, Reflect] attribute DOMString align; 2911 [CEReactions, Reflect] attribute DOMString scrolling; 2912 [CEReactions, Reflect] attribute DOMString frameBorder; 2913 [CEReactions, ReflectURL] attribute USVString longDesc; 2914 2915 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString marginHeight; 2916 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString marginWidth; 2917 }; 2918 2919 partial interface HTMLImageElement { 2920 [CEReactions, Reflect] attribute DOMString name; 2921 [CEReactions, ReflectURL] attribute USVString lowsrc; 2922 [CEReactions, Reflect] attribute DOMString align; 2923 [CEReactions, Reflect] attribute unsigned long hspace; 2924 [CEReactions, Reflect] attribute unsigned long vspace; 2925 [CEReactions, ReflectURL] attribute USVString longDesc; 2926 2927 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString border; 2928 }; 2929 2930 partial interface HTMLInputElement { 2931 [CEReactions, Reflect] attribute DOMString align; 2932 [CEReactions, Reflect] attribute DOMString useMap; 2933 }; 2934 2935 partial interface HTMLLegendElement { 2936 [CEReactions, Reflect] attribute DOMString align; 2937 }; 2938 2939 partial interface HTMLLIElement { 2940 [CEReactions, Reflect] attribute DOMString type; 2941 }; 2942 2943 partial interface HTMLLinkElement { 2944 [CEReactions, Reflect] attribute DOMString charset; 2945 [CEReactions, Reflect] attribute DOMString rev; 2946 [CEReactions, Reflect] attribute DOMString target; 2947 }; 2948 2949 partial interface HTMLMenuElement { 2950 [CEReactions, Reflect] attribute boolean compact; 2951 }; 2952 2953 partial interface HTMLMetaElement { 2954 [CEReactions, Reflect] attribute DOMString scheme; 2955 }; 2956 2957 partial interface HTMLObjectElement { 2958 [CEReactions, Reflect] attribute DOMString align; 2959 [CEReactions, Reflect] attribute DOMString archive; 2960 [CEReactions, Reflect] attribute DOMString code; 2961 [CEReactions, Reflect] attribute boolean declare; 2962 [CEReactions, Reflect] attribute unsigned long hspace; 2963 [CEReactions, Reflect] attribute DOMString standby; 2964 [CEReactions, Reflect] attribute unsigned long vspace; 2965 [CEReactions, ReflectURL] attribute DOMString codeBase; 2966 [CEReactions, Reflect] attribute DOMString codeType; 2967 [CEReactions, Reflect] attribute DOMString useMap; 2968 2969 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString border; 2970 }; 2971 2972 partial interface HTMLOListElement { 2973 [CEReactions, Reflect] attribute boolean compact; 2974 }; 2975 2976 partial interface HTMLParagraphElement { 2977 [CEReactions, Reflect] attribute DOMString align; 2978 }; 2979 2980 [Exposed=Window] 2981 interface HTMLParamElement : HTMLElement { 2982 [HTMLConstructor] constructor(); 2983 2984 [CEReactions, Reflect] attribute DOMString name; 2985 [CEReactions, Reflect] attribute DOMString value; 2986 [CEReactions, Reflect] attribute DOMString type; 2987 [CEReactions, Reflect] attribute DOMString valueType; 2988 }; 2989 2990 partial interface HTMLPreElement { 2991 [CEReactions, Reflect] attribute long width; 2992 }; 2993 2994 partial interface HTMLStyleElement { 2995 [CEReactions, Reflect] attribute DOMString type; 2996 }; 2997 2998 partial interface HTMLScriptElement { 2999 [CEReactions, Reflect] attribute DOMString charset; 3000 [CEReactions, Reflect] attribute DOMString event; 3001 [CEReactions, Reflect="for"] attribute DOMString htmlFor; 3002 }; 3003 3004 partial interface HTMLTableElement { 3005 [CEReactions, Reflect] attribute DOMString align; 3006 [CEReactions, Reflect] attribute DOMString border; 3007 [CEReactions, Reflect] attribute DOMString frame; 3008 [CEReactions, Reflect] attribute DOMString rules; 3009 [CEReactions, Reflect] attribute DOMString summary; 3010 [CEReactions, Reflect] attribute DOMString width; 3011 3012 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString bgColor; 3013 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString cellPadding; 3014 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString cellSpacing; 3015 }; 3016 3017 partial interface HTMLTableSectionElement { 3018 [CEReactions, Reflect] attribute DOMString align; 3019 [CEReactions, Reflect="char"] attribute DOMString ch; 3020 [CEReactions, Reflect="charoff"] attribute DOMString chOff; 3021 [CEReactions, Reflect] attribute DOMString vAlign; 3022 }; 3023 3024 partial interface HTMLTableCellElement { 3025 [CEReactions, Reflect] attribute DOMString align; 3026 [CEReactions, Reflect] attribute DOMString axis; 3027 [CEReactions, Reflect] attribute DOMString height; 3028 [CEReactions, Reflect] attribute DOMString width; 3029 3030 [CEReactions, Reflect="char"] attribute DOMString ch; 3031 [CEReactions, Reflect="charoff"] attribute DOMString chOff; 3032 [CEReactions, Reflect] attribute boolean noWrap; 3033 [CEReactions, Reflect] attribute DOMString vAlign; 3034 3035 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString bgColor; 3036 }; 3037 3038 partial interface HTMLTableRowElement { 3039 [CEReactions, Reflect] attribute DOMString align; 3040 [CEReactions, Reflect="char"] attribute DOMString ch; 3041 [CEReactions, Reflect="charoff"] attribute DOMString chOff; 3042 [CEReactions, Reflect] attribute DOMString vAlign; 3043 3044 [CEReactions, Reflect] attribute [LegacyNullToEmptyString] DOMString bgColor; 3045 }; 3046 3047 partial interface HTMLUListElement { 3048 [CEReactions, Reflect] attribute boolean compact; 3049 [CEReactions, Reflect] attribute DOMString type; 3050 }; 3051 3052 partial interface Document { 3053 [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor; 3054 [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor; 3055 [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor; 3056 [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor; 3057 [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor; 3058 3059 [SameObject] readonly attribute HTMLCollection anchors; 3060 [SameObject] readonly attribute HTMLCollection applets; 3061 3062 undefined clear(); 3063 undefined captureEvents(); 3064 undefined releaseEvents(); 3065 3066 [SameObject] readonly attribute HTMLAllCollection all; 3067 }; 3068 3069 partial interface Window { 3070 undefined captureEvents(); 3071 undefined releaseEvents(); 3072 3073 [Replaceable, SameObject] readonly attribute External external; 3074 }; 3075 3076 [Exposed=Window] 3077 interface External { 3078 undefined AddSearchProvider(); 3079 undefined IsSearchProviderInstalled(); 3080 };