1// HTML web IDL 2// Retrived from https://html.spec.whatwg.org/ 3// Sat Jul 18 2015 4 5 6typedef (Int8Array or Uint8Array or Uint8ClampedArray or 7 Int16Array or Uint16Array or 8 Int32Array or Uint32Array or 9 Float32Array or Float64Array or 10 DataView) ArrayBufferView; 11 12interface HTMLAllCollection : HTMLCollection { 13 // inherits length and 'getter' 14 Element? item(unsigned long index); 15 (HTMLCollection or Element)? item(DOMString name); 16 legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem() 17}; 18 19interface HTMLFormControlsCollection : HTMLCollection { 20 // inherits length and item() 21 legacycaller getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() 22}; 23 24interface RadioNodeList : NodeList { 25 attribute DOMString value; 26}; 27 28interface HTMLOptionsCollection : HTMLCollection { 29 // inherits item() 30 attribute unsigned long length; // shadows inherited length 31 legacycaller HTMLOptionElement? (DOMString name); 32 setter creator void (unsigned long index, HTMLOptionElement? option); 33 void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); 34 void remove(long index); 35 attribute long selectedIndex; 36}; 37 38interface HTMLPropertiesCollection : HTMLCollection { 39 // inherits length and item() 40 getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem() 41 [SameObject] readonly attribute DOMString[] names; 42}; 43 44typedef sequence<any> PropertyValueArray; 45 46interface PropertyNodeList : NodeList { 47 PropertyValueArray getValues(); 48}; 49 50[OverrideBuiltins, Exposed=(Window,Worker)] 51interface DOMStringMap { 52 getter DOMString (DOMString name); 53 setter creator void (DOMString name, DOMString value); 54 deleter void (DOMString name); 55}; 56 57interface DOMElementMap { 58 getter Element (DOMString name); 59 setter creator void (DOMString name, Element value); 60 deleter void (DOMString name); 61}; 62 63typedef (ArrayBuffer or CanvasProxy or MessagePort) Transferable; 64 65callback FileCallback = void (File file); 66 67enum DocumentReadyState { "loading", "interactive", "complete" }; 68 69[OverrideBuiltins] 70partial /*sealed*/ interface Document { 71 // resource metadata management 72 [PutForwards=href, Unforgeable] readonly attribute Location? location; 73 attribute DOMString domain; 74 readonly attribute DOMString referrer; 75 attribute DOMString cookie; 76 readonly attribute DOMString lastModified; 77 readonly attribute DocumentReadyState readyState; 78 79 // DOM tree accessors 80 getter object (DOMString name); 81 attribute DOMString title; 82 attribute DOMString dir; 83 attribute HTMLElement? body; 84 readonly attribute HTMLHeadElement? head; 85 [SameObject] readonly attribute HTMLCollection images; 86 [SameObject] readonly attribute HTMLCollection embeds; 87 [SameObject] readonly attribute HTMLCollection plugins; 88 [SameObject] readonly attribute HTMLCollection links; 89 [SameObject] readonly attribute HTMLCollection forms; 90 [SameObject] readonly attribute HTMLCollection scripts; 91 NodeList getElementsByName(DOMString elementName); 92 NodeList getItems(optional DOMString typeNames = ""); // microdata 93 [SameObject] readonly attribute DOMElementMap cssElementMap; 94 readonly attribute HTMLScriptElement? currentScript; 95 96 // dynamic markup insertion 97 Document open(optional DOMString type = "text/html", optional DOMString replace = ""); 98 WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); 99 void close(); 100 void write(DOMString... text); 101 void writeln(DOMString... text); 102 103 // user interaction 104 readonly attribute WindowProxy? defaultView; 105 readonly attribute Element? activeElement; 106 boolean hasFocus(); 107 attribute DOMString designMode; 108 boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); 109 boolean queryCommandEnabled(DOMString commandId); 110 boolean queryCommandIndeterm(DOMString commandId); 111 boolean queryCommandState(DOMString commandId); 112 boolean queryCommandSupported(DOMString commandId); 113 DOMString queryCommandValue(DOMString commandId); 114 readonly attribute HTMLCollection commands; 115 116 // special event handler IDL attributes that only apply to Document objects 117 [LenientThis] attribute EventHandler onreadystatechange; 118 119 // also has obsolete members 120}; 121Document implements GlobalEventHandlers; 122 123partial interface XMLDocument { 124 boolean load(DOMString url); 125}; 126 127interface HTMLElement : Element { 128 // metadata attributes 129 attribute DOMString title; 130 attribute DOMString lang; 131 attribute boolean translate; 132 attribute DOMString dir; 133 [SameObject] readonly attribute DOMStringMap dataset; 134 135 // microdata 136 attribute boolean itemScope; 137 [PutForwards=value] readonly attribute DOMSettableTokenList itemType; 138 attribute DOMString itemId; 139 [PutForwards=value] readonly attribute DOMSettableTokenList itemRef; 140 [PutForwards=value] readonly attribute DOMSettableTokenList itemProp; 141 readonly attribute HTMLPropertiesCollection properties; 142 attribute any itemValue; // acts as DOMString on setting 143 144 // user interaction 145 attribute boolean hidden; 146 void click(); 147 attribute long tabIndex; 148 void focus(); 149 void blur(); 150 attribute DOMString accessKey; 151 readonly attribute DOMString accessKeyLabel; 152 attribute boolean draggable; 153 [PutForwards=value] readonly attribute DOMSettableTokenList dropzone; 154 attribute HTMLMenuElement? contextMenu; 155 attribute boolean spellcheck; 156 void forceSpellCheck(); 157 158 // command API 159 readonly attribute DOMString? commandType; 160 readonly attribute DOMString? commandLabel; 161 readonly attribute DOMString? commandIcon; 162 readonly attribute boolean? commandHidden; 163 readonly attribute boolean? commandDisabled; 164 readonly attribute boolean? commandChecked; 165}; 166HTMLElement implements GlobalEventHandlers; 167HTMLElement implements ElementContentEditable; 168 169interface HTMLUnknownElement : HTMLElement { }; 170 171interface HTMLHtmlElement : HTMLElement { 172 // also has obsolete members 173}; 174 175interface HTMLHeadElement : HTMLElement {}; 176 177interface HTMLTitleElement : HTMLElement { 178 attribute DOMString text; 179}; 180 181interface HTMLBaseElement : HTMLElement { 182 attribute DOMString href; 183 attribute DOMString target; 184}; 185 186interface HTMLLinkElement : HTMLElement { 187 attribute DOMString href; 188 attribute DOMString? crossOrigin; 189 attribute DOMString rel; 190 readonly attribute DOMTokenList relList; 191 attribute DOMString media; 192 attribute DOMString hreflang; 193 attribute DOMString type; 194 [PutForwards=value] readonly attribute DOMSettableTokenList sizes; 195 196 // also has obsolete members 197}; 198HTMLLinkElement implements LinkStyle; 199 200interface HTMLMetaElement : HTMLElement { 201 attribute DOMString name; 202 attribute DOMString httpEquiv; 203 attribute DOMString content; 204 205 // also has obsolete members 206}; 207 208interface HTMLStyleElement : HTMLElement { 209 attribute DOMString media; 210 attribute DOMString type; 211 attribute boolean scoped; 212}; 213HTMLStyleElement implements LinkStyle; 214 215interface HTMLBodyElement : HTMLElement { 216 217 // also has obsolete members 218}; 219HTMLBodyElement implements WindowEventHandlers; 220 221interface HTMLHeadingElement : HTMLElement { 222 // also has obsolete members 223}; 224 225interface HTMLParagraphElement : HTMLElement { 226 // also has obsolete members 227}; 228 229interface HTMLHRElement : HTMLElement { 230 // also has obsolete members 231}; 232 233interface HTMLPreElement : HTMLElement { 234 // also has obsolete members 235}; 236 237interface HTMLQuoteElement : HTMLElement { 238 attribute DOMString cite; 239}; 240 241interface HTMLOListElement : HTMLElement { 242 attribute boolean reversed; 243 attribute long start; 244 attribute DOMString type; 245 246 // also has obsolete members 247}; 248 249interface HTMLUListElement : HTMLElement { 250 // also has obsolete members 251}; 252 253interface HTMLLIElement : HTMLElement { 254 attribute long value; 255 256 // also has obsolete members 257}; 258 259interface HTMLDListElement : HTMLElement { 260 // also has obsolete members 261}; 262 263interface HTMLDivElement : HTMLElement { 264 // also has obsolete members 265}; 266 267interface HTMLAnchorElement : HTMLElement { 268 attribute DOMString target; 269 attribute DOMString download; 270 [PutForwards=value] attribute DOMSettableTokenList ping; 271 attribute DOMString rel; 272 readonly attribute DOMTokenList relList; 273 attribute DOMString hreflang; 274 attribute DOMString type; 275 276 attribute DOMString text; 277 278 // also has obsolete members 279}; 280HTMLAnchorElement implements URLUtils; 281 282interface HTMLDataElement : HTMLElement { 283 attribute DOMString value; 284}; 285 286interface HTMLTimeElement : HTMLElement { 287 attribute DOMString dateTime; 288}; 289 290interface HTMLSpanElement : HTMLElement {}; 291 292interface HTMLBRElement : HTMLElement { 293 // also has obsolete members 294}; 295 296interface HTMLModElement : HTMLElement { 297 attribute DOMString cite; 298 attribute DOMString dateTime; 299}; 300 301interface HTMLPictureElement : HTMLElement {}; 302 303partial interface HTMLSourceElement { 304 attribute DOMString srcset; 305 attribute DOMString sizes; 306 attribute DOMString media; 307}; 308 309[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)] 310interface HTMLImageElement : HTMLElement { 311 attribute DOMString alt; 312 attribute DOMString src; 313 attribute DOMString srcset; 314 attribute DOMString sizes; 315 attribute DOMString? crossOrigin; 316 attribute DOMString useMap; 317 attribute boolean isMap; 318 attribute unsigned long width; 319 attribute unsigned long height; 320 readonly attribute unsigned long naturalWidth; 321 readonly attribute unsigned long naturalHeight; 322 readonly attribute boolean complete; 323 readonly attribute DOMString currentSrc; 324 325 // also has obsolete members 326}; 327 328interface HTMLIFrameElement : HTMLElement { 329 attribute DOMString src; 330 attribute DOMString srcdoc; 331 attribute DOMString name; 332 [PutForwards=value] readonly attribute DOMSettableTokenList sandbox; 333 attribute boolean seamless; 334 attribute boolean allowFullscreen; 335 attribute DOMString width; 336 attribute DOMString height; 337 readonly attribute Document? contentDocument; 338 readonly attribute WindowProxy? contentWindow; 339 Document? getSVGDocument(); 340 341 // also has obsolete members 342}; 343 344interface HTMLEmbedElement : HTMLElement { 345 attribute DOMString src; 346 attribute DOMString type; 347 attribute DOMString width; 348 attribute DOMString height; 349 Document? getSVGDocument(); 350 legacycaller any (any... arguments); 351 352 // also has obsolete members 353}; 354 355interface HTMLObjectElement : HTMLElement { 356 attribute DOMString data; 357 attribute DOMString type; 358 attribute boolean typeMustMatch; 359 attribute DOMString name; 360 attribute DOMString useMap; 361 readonly attribute HTMLFormElement? form; 362 attribute DOMString width; 363 attribute DOMString height; 364 readonly attribute Document? contentDocument; 365 readonly attribute WindowProxy? contentWindow; 366 Document? getSVGDocument(); 367 368 readonly attribute boolean willValidate; 369 readonly attribute ValidityState validity; 370 readonly attribute DOMString validationMessage; 371 boolean checkValidity(); 372 boolean reportValidity(); 373 void setCustomValidity(DOMString error); 374 375 legacycaller any (any... arguments); 376 377 // also has obsolete members 378}; 379 380interface HTMLParamElement : HTMLElement { 381 attribute DOMString name; 382 attribute DOMString value; 383 384 // also has obsolete members 385}; 386 387interface HTMLVideoElement : HTMLMediaElement { 388 attribute unsigned long width; 389 attribute unsigned long height; 390 readonly attribute unsigned long videoWidth; 391 readonly attribute unsigned long videoHeight; 392 attribute DOMString poster; 393}; 394 395[NamedConstructor=Audio(optional DOMString src)] 396interface HTMLAudioElement : HTMLMediaElement {}; 397 398interface HTMLSourceElement : HTMLElement { 399 attribute DOMString src; 400 attribute DOMString type; 401 402 // also has obsolete members 403}; 404 405interface HTMLTrackElement : HTMLElement { 406 attribute DOMString kind; 407 attribute DOMString src; 408 attribute DOMString srclang; 409 attribute DOMString label; 410 attribute boolean default; 411 412 const unsigned short NONE = 0; 413 const unsigned short LOADING = 1; 414 const unsigned short LOADED = 2; 415 const unsigned short ERROR = 3; 416 readonly attribute unsigned short readyState; 417 418 readonly attribute TextTrack track; 419}; 420 421enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; 422typedef (MediaStream or MediaSource or Blob) MediaProvider; 423interface HTMLMediaElement : HTMLElement { 424 425 // error state 426 readonly attribute MediaError? error; 427 428 // network state 429 attribute DOMString src; 430 attribute MediaProvider? srcObject; 431 readonly attribute DOMString currentSrc; 432 attribute DOMString? crossOrigin; 433 const unsigned short NETWORK_EMPTY = 0; 434 const unsigned short NETWORK_IDLE = 1; 435 const unsigned short NETWORK_LOADING = 2; 436 const unsigned short NETWORK_NO_SOURCE = 3; 437 readonly attribute unsigned short networkState; 438 attribute DOMString preload; 439 readonly attribute TimeRanges buffered; 440 void load(); 441 CanPlayTypeResult canPlayType(DOMString type); 442 443 // ready state 444 const unsigned short HAVE_NOTHING = 0; 445 const unsigned short HAVE_METADATA = 1; 446 const unsigned short HAVE_CURRENT_DATA = 2; 447 const unsigned short HAVE_FUTURE_DATA = 3; 448 const unsigned short HAVE_ENOUGH_DATA = 4; 449 readonly attribute unsigned short readyState; 450 readonly attribute boolean seeking; 451 452 // playback state 453 attribute double currentTime; 454 void fastSeek(double time); 455 readonly attribute unrestricted double duration; 456 Date getStartDate(); 457 readonly attribute boolean paused; 458 attribute double defaultPlaybackRate; 459 attribute double playbackRate; 460 readonly attribute TimeRanges played; 461 readonly attribute TimeRanges seekable; 462 readonly attribute boolean ended; 463 attribute boolean autoplay; 464 attribute boolean loop; 465 void play(); 466 void pause(); 467 468 // media controller 469 attribute DOMString mediaGroup; 470 attribute MediaController? controller; 471 472 // controls 473 attribute boolean controls; 474 attribute double volume; 475 attribute boolean muted; 476 attribute boolean defaultMuted; 477 478 // tracks 479 [SameObject] readonly attribute AudioTrackList audioTracks; 480 [SameObject] readonly attribute VideoTrackList videoTracks; 481 [SameObject] readonly attribute TextTrackList textTracks; 482 TextTrack addTextTrack(TextTrackKind kind, optional DOMString label = "", optional DOMString language = ""); 483}; 484 485interface MediaError { 486 const unsigned short MEDIA_ERR_ABORTED = 1; 487 const unsigned short MEDIA_ERR_NETWORK = 2; 488 const unsigned short MEDIA_ERR_DECODE = 3; 489 const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; 490 readonly attribute unsigned short code; 491}; 492 493interface AudioTrackList : EventTarget { 494 readonly attribute unsigned long length; 495 getter AudioTrack (unsigned long index); 496 AudioTrack? getTrackById(DOMString id); 497 498 attribute EventHandler onchange; 499 attribute EventHandler onaddtrack; 500 attribute EventHandler onremovetrack; 501}; 502 503interface AudioTrack { 504 readonly attribute DOMString id; 505 readonly attribute DOMString kind; 506 readonly attribute DOMString label; 507 readonly attribute DOMString language; 508 attribute boolean enabled; 509}; 510 511interface VideoTrackList : EventTarget { 512 readonly attribute unsigned long length; 513 getter VideoTrack (unsigned long index); 514 VideoTrack? getTrackById(DOMString id); 515 readonly attribute long selectedIndex; 516 517 attribute EventHandler onchange; 518 attribute EventHandler onaddtrack; 519 attribute EventHandler onremovetrack; 520}; 521 522interface VideoTrack { 523 readonly attribute DOMString id; 524 readonly attribute DOMString kind; 525 readonly attribute DOMString label; 526 readonly attribute DOMString language; 527 attribute boolean selected; 528}; 529 530enum MediaControllerPlaybackState { "waiting", "playing", "ended" }; 531[Constructor] 532interface MediaController : EventTarget { 533 readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values 534 535 readonly attribute TimeRanges buffered; 536 readonly attribute TimeRanges seekable; 537 readonly attribute unrestricted double duration; 538 attribute double currentTime; 539 540 readonly attribute boolean paused; 541 readonly attribute MediaControllerPlaybackState playbackState; 542 readonly attribute TimeRanges played; 543 void pause(); 544 void unpause(); 545 void play(); // calls play() on all media elements as well 546 547 attribute double defaultPlaybackRate; 548 attribute double playbackRate; 549 550 attribute double volume; 551 attribute boolean muted; 552 553 attribute EventHandler onemptied; 554 attribute EventHandler onloadedmetadata; 555 attribute EventHandler onloadeddata; 556 attribute EventHandler oncanplay; 557 attribute EventHandler oncanplaythrough; 558 attribute EventHandler onplaying; 559 attribute EventHandler onended; 560 attribute EventHandler onwaiting; 561 562 attribute EventHandler ondurationchange; 563 attribute EventHandler ontimeupdate; 564 attribute EventHandler onplay; 565 attribute EventHandler onpause; 566 attribute EventHandler onratechange; 567 attribute EventHandler onvolumechange; 568}; 569 570interface TextTrackList : EventTarget { 571 readonly attribute unsigned long length; 572 getter TextTrack (unsigned long index); 573 TextTrack? getTrackById(DOMString id); 574 575 attribute EventHandler onchange; 576 attribute EventHandler onaddtrack; 577 attribute EventHandler onremovetrack; 578}; 579 580enum TextTrackMode { "disabled", "hidden", "showing" }; 581enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" }; 582interface TextTrack : EventTarget { 583 readonly attribute TextTrackKind kind; 584 readonly attribute DOMString label; 585 readonly attribute DOMString language; 586 587 readonly attribute DOMString id; 588 readonly attribute DOMString inBandMetadataTrackDispatchType; 589 590 attribute TextTrackMode mode; 591 592 readonly attribute TextTrackCueList? cues; 593 readonly attribute TextTrackCueList? activeCues; 594 595 void addCue(TextTrackCue cue); 596 void removeCue(TextTrackCue cue); 597 598 attribute EventHandler oncuechange; 599}; 600 601interface TextTrackCueList { 602 readonly attribute unsigned long length; 603 getter TextTrackCue (unsigned long index); 604 TextTrackCue? getCueById(DOMString id); 605}; 606 607interface TextTrackCue : EventTarget { 608 readonly attribute TextTrack? track; 609 610 attribute DOMString id; 611 attribute double startTime; 612 attribute double endTime; 613 attribute boolean pauseOnExit; 614 615 attribute EventHandler onenter; 616 attribute EventHandler onexit; 617}; 618 619interface TimeRanges { 620 readonly attribute unsigned long length; 621 double start(unsigned long index); 622 double end(unsigned long index); 623}; 624 625[Constructor(DOMString type, optional TrackEventInit eventInitDict)] 626interface TrackEvent : Event { 627 readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; 628}; 629 630dictionary TrackEventInit : EventInit { 631 (VideoTrack or AudioTrack or TextTrack)? track; 632}; 633 634interface HTMLMapElement : HTMLElement { 635 attribute DOMString name; 636 readonly attribute HTMLCollection areas; 637 readonly attribute HTMLCollection images; 638}; 639 640interface HTMLAreaElement : HTMLElement { 641 attribute DOMString alt; 642 attribute DOMString coords; 643 attribute DOMString shape; 644 attribute DOMString target; 645 attribute DOMString download; 646 [PutForwards=value] attribute DOMSettableTokenList ping; 647 attribute DOMString rel; 648 readonly attribute DOMTokenList relList; 649 attribute DOMString hreflang; 650 attribute DOMString type; 651 652 // also has obsolete members 653}; 654HTMLAreaElement implements URLUtils; 655 656interface HTMLTableElement : HTMLElement { 657 attribute HTMLTableCaptionElement? caption; 658 HTMLElement createCaption(); 659 void deleteCaption(); 660 attribute HTMLTableSectionElement? tHead; 661 HTMLElement createTHead(); 662 void deleteTHead(); 663 attribute HTMLTableSectionElement? tFoot; 664 HTMLElement createTFoot(); 665 void deleteTFoot(); 666 readonly attribute HTMLCollection tBodies; 667 HTMLElement createTBody(); 668 readonly attribute HTMLCollection rows; 669 HTMLElement insertRow(optional long index = -1); 670 void deleteRow(long index); 671 attribute boolean sortable; 672 void stopSorting(); 673 674 // also has obsolete members 675}; 676 677interface HTMLTableCaptionElement : HTMLElement { 678 // also has obsolete members 679}; 680 681interface HTMLTableColElement : HTMLElement { 682 attribute unsigned long span; 683 684 // also has obsolete members 685}; 686 687interface HTMLTableSectionElement : HTMLElement { 688 readonly attribute HTMLCollection rows; 689 HTMLElement insertRow(optional long index = -1); 690 void deleteRow(long index); 691 692 // also has obsolete members 693}; 694 695interface HTMLTableRowElement : HTMLElement { 696 readonly attribute long rowIndex; 697 readonly attribute long sectionRowIndex; 698 readonly attribute HTMLCollection cells; 699 HTMLElement insertCell(optional long index = -1); 700 void deleteCell(long index); 701 702 // also has obsolete members 703}; 704 705interface HTMLTableDataCellElement : HTMLTableCellElement { 706 // also has obsolete members 707}; 708 709interface HTMLTableHeaderCellElement : HTMLTableCellElement { 710 attribute DOMString scope; 711 attribute DOMString abbr; 712 attribute DOMString sorted; 713 void sort(); 714}; 715 716interface HTMLTableCellElement : HTMLElement { 717 attribute unsigned long colSpan; 718 attribute unsigned long rowSpan; 719 [PutForwards=value] readonly attribute DOMSettableTokenList headers; 720 readonly attribute long cellIndex; 721 722 // also has obsolete members 723}; 724 725[OverrideBuiltins] 726interface HTMLFormElement : HTMLElement { 727 attribute DOMString acceptCharset; 728 attribute DOMString action; 729 attribute DOMString autocomplete; 730 attribute DOMString enctype; 731 attribute DOMString encoding; 732 attribute DOMString method; 733 attribute DOMString name; 734 attribute boolean noValidate; 735 attribute DOMString target; 736 737 readonly attribute HTMLFormControlsCollection elements; 738 readonly attribute long length; 739 getter Element (unsigned long index); 740 getter (RadioNodeList or Element) (DOMString name); 741 742 void submit(); 743 void reset(); 744 boolean checkValidity(); 745 boolean reportValidity(); 746 747 void requestAutocomplete(); 748}; 749 750interface HTMLLabelElement : HTMLElement { 751 readonly attribute HTMLFormElement? form; 752 attribute DOMString htmlFor; 753 readonly attribute HTMLElement? control; 754}; 755 756interface HTMLInputElement : HTMLElement { 757 attribute DOMString accept; 758 attribute DOMString alt; 759 attribute DOMString autocomplete; 760 attribute boolean autofocus; 761 attribute boolean defaultChecked; 762 attribute boolean checked; 763 attribute DOMString dirName; 764 attribute boolean disabled; 765 readonly attribute HTMLFormElement? form; 766 readonly attribute FileList? files; 767 attribute DOMString formAction; 768 attribute DOMString formEnctype; 769 attribute DOMString formMethod; 770 attribute boolean formNoValidate; 771 attribute DOMString formTarget; 772 attribute unsigned long height; 773 attribute boolean indeterminate; 774 attribute DOMString inputMode; 775 readonly attribute HTMLElement? list; 776 attribute DOMString max; 777 attribute long maxLength; 778 attribute DOMString min; 779 attribute long minLength; 780 attribute boolean multiple; 781 attribute DOMString name; 782 attribute DOMString pattern; 783 attribute DOMString placeholder; 784 attribute boolean readOnly; 785 attribute boolean required; 786 attribute unsigned long size; 787 attribute DOMString src; 788 attribute DOMString step; 789 attribute DOMString type; 790 attribute DOMString defaultValue; 791 [TreatNullAs=EmptyString] attribute DOMString value; 792 attribute Date? valueAsDate; 793 attribute unrestricted double valueAsNumber; 794 attribute double valueLow; 795 attribute double valueHigh; 796 attribute unsigned long width; 797 798 void stepUp(optional long n = 1); 799 void stepDown(optional long n = 1); 800 801 readonly attribute boolean willValidate; 802 readonly attribute ValidityState validity; 803 readonly attribute DOMString validationMessage; 804 boolean checkValidity(); 805 boolean reportValidity(); 806 void setCustomValidity(DOMString error); 807 808 readonly attribute NodeList labels; 809 810 void select(); 811 attribute unsigned long selectionStart; 812 attribute unsigned long selectionEnd; 813 attribute DOMString selectionDirection; 814 void setRangeText(DOMString replacement); 815 void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); 816 void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 817 818 // also has obsolete members 819}; 820 821interface HTMLButtonElement : HTMLElement { 822 attribute boolean autofocus; 823 attribute boolean disabled; 824 readonly attribute HTMLFormElement? form; 825 attribute DOMString formAction; 826 attribute DOMString formEnctype; 827 attribute DOMString formMethod; 828 attribute boolean formNoValidate; 829 attribute DOMString formTarget; 830 attribute DOMString name; 831 attribute DOMString type; 832 attribute DOMString value; 833 attribute HTMLMenuElement? menu; 834 835 readonly attribute boolean willValidate; 836 readonly attribute ValidityState validity; 837 readonly attribute DOMString validationMessage; 838 boolean checkValidity(); 839 boolean reportValidity(); 840 void setCustomValidity(DOMString error); 841 842 readonly attribute NodeList labels; 843}; 844 845interface HTMLSelectElement : HTMLElement { 846 attribute DOMString autocomplete; 847 attribute boolean autofocus; 848 attribute boolean disabled; 849 readonly attribute HTMLFormElement? form; 850 attribute boolean multiple; 851 attribute DOMString name; 852 attribute boolean required; 853 attribute unsigned long size; 854 855 readonly attribute DOMString type; 856 857 readonly attribute HTMLOptionsCollection options; 858 attribute unsigned long length; 859 getter Element? item(unsigned long index); 860 HTMLOptionElement? namedItem(DOMString name); 861 void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); 862 void remove(); // ChildNode overload 863 void remove(long index); 864 setter creator void (unsigned long index, HTMLOptionElement? option); 865 866 readonly attribute HTMLCollection selectedOptions; 867 attribute long selectedIndex; 868 attribute DOMString value; 869 870 readonly attribute boolean willValidate; 871 readonly attribute ValidityState validity; 872 readonly attribute DOMString validationMessage; 873 boolean checkValidity(); 874 boolean reportValidity(); 875 void setCustomValidity(DOMString error); 876 877 readonly attribute NodeList labels; 878}; 879 880interface HTMLDataListElement : HTMLElement { 881 readonly attribute HTMLCollection options; 882}; 883 884interface HTMLOptGroupElement : HTMLElement { 885 attribute boolean disabled; 886 attribute DOMString label; 887}; 888 889[NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)] 890interface HTMLOptionElement : HTMLElement { 891 attribute boolean disabled; 892 readonly attribute HTMLFormElement? form; 893 attribute DOMString label; 894 attribute boolean defaultSelected; 895 attribute boolean selected; 896 attribute DOMString value; 897 898 attribute DOMString text; 899 readonly attribute long index; 900}; 901 902interface HTMLTextAreaElement : HTMLElement { 903 attribute DOMString autocomplete; 904 attribute boolean autofocus; 905 attribute unsigned long cols; 906 attribute DOMString dirName; 907 attribute boolean disabled; 908 readonly attribute HTMLFormElement? form; 909 attribute DOMString inputMode; 910 attribute long maxLength; 911 attribute long minLength; 912 attribute DOMString name; 913 attribute DOMString placeholder; 914 attribute boolean readOnly; 915 attribute boolean required; 916 attribute unsigned long rows; 917 attribute DOMString wrap; 918 919 readonly attribute DOMString type; 920 attribute DOMString defaultValue; 921 [TreatNullAs=EmptyString] attribute DOMString value; 922 readonly attribute unsigned long textLength; 923 924 readonly attribute boolean willValidate; 925 readonly attribute ValidityState validity; 926 readonly attribute DOMString validationMessage; 927 boolean checkValidity(); 928 boolean reportValidity(); 929 void setCustomValidity(DOMString error); 930 931 readonly attribute NodeList labels; 932 933 void select(); 934 attribute unsigned long selectionStart; 935 attribute unsigned long selectionEnd; 936 attribute DOMString selectionDirection; 937 void setRangeText(DOMString replacement); 938 void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); 939 void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 940}; 941 942interface HTMLKeygenElement : HTMLElement { 943 attribute boolean autofocus; 944 attribute DOMString challenge; 945 attribute boolean disabled; 946 readonly attribute HTMLFormElement? form; 947 attribute DOMString keytype; 948 attribute DOMString name; 949 950 readonly attribute DOMString type; 951 952 readonly attribute boolean willValidate; 953 readonly attribute ValidityState validity; 954 readonly attribute DOMString validationMessage; 955 boolean checkValidity(); 956 boolean reportValidity(); 957 void setCustomValidity(DOMString error); 958 959 readonly attribute NodeList labels; 960}; 961 962interface HTMLOutputElement : HTMLElement { 963 [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; 964 readonly attribute HTMLFormElement? form; 965 attribute DOMString name; 966 967 readonly attribute DOMString type; 968 attribute DOMString defaultValue; 969 attribute DOMString value; 970 971 readonly attribute boolean willValidate; 972 readonly attribute ValidityState validity; 973 readonly attribute DOMString validationMessage; 974 boolean checkValidity(); 975 boolean reportValidity(); 976 void setCustomValidity(DOMString error); 977 978 readonly attribute NodeList labels; 979}; 980 981interface HTMLProgressElement : HTMLElement { 982 attribute double value; 983 attribute double max; 984 readonly attribute double position; 985 readonly attribute NodeList labels; 986}; 987 988interface HTMLMeterElement : HTMLElement { 989 attribute double value; 990 attribute double min; 991 attribute double max; 992 attribute double low; 993 attribute double high; 994 attribute double optimum; 995 readonly attribute NodeList labels; 996}; 997 998interface HTMLFieldSetElement : HTMLElement { 999 attribute boolean disabled; 1000 readonly attribute HTMLFormElement? form; 1001 attribute DOMString name; 1002 1003 readonly attribute DOMString type; 1004 1005 readonly attribute HTMLFormControlsCollection elements; 1006 1007 readonly attribute boolean willValidate; 1008 [SameObject] readonly attribute ValidityState validity; 1009 readonly attribute DOMString validationMessage; 1010 boolean checkValidity(); 1011 boolean reportValidity(); 1012 void setCustomValidity(DOMString error); 1013}; 1014 1015interface HTMLLegendElement : HTMLElement { 1016 readonly attribute HTMLFormElement? form; 1017 1018 // also has obsolete members 1019}; 1020 1021enum AutocompleteErrorReason { "" /* empty string */, "cancel", "disabled", "invalid" }; 1022 1023[Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)] 1024interface AutocompleteErrorEvent : Event { 1025 readonly attribute AutocompleteErrorReason reason; 1026}; 1027 1028dictionary AutocompleteErrorEventInit : EventInit { 1029 AutocompleteErrorReason reason; 1030}; 1031 1032enum SelectionMode { 1033 "select", 1034 "start", 1035 "end", 1036 "preserve", // default 1037}; 1038 1039interface ValidityState { 1040 readonly attribute boolean valueMissing; 1041 readonly attribute boolean typeMismatch; 1042 readonly attribute boolean patternMismatch; 1043 readonly attribute boolean tooLong; 1044 readonly attribute boolean tooShort; 1045 readonly attribute boolean rangeUnderflow; 1046 readonly attribute boolean rangeOverflow; 1047 readonly attribute boolean stepMismatch; 1048 readonly attribute boolean badInput; 1049 readonly attribute boolean customError; 1050 readonly attribute boolean valid; 1051}; 1052 1053interface HTMLDetailsElement : HTMLElement { 1054 attribute boolean open; 1055}; 1056 1057interface HTMLMenuElement : HTMLElement { 1058 attribute DOMString type; 1059 attribute DOMString label; 1060 1061 // also has obsolete members 1062}; 1063 1064interface HTMLMenuItemElement : HTMLElement { 1065 attribute DOMString type; 1066 attribute DOMString label; 1067 attribute DOMString icon; 1068 attribute boolean disabled; 1069 attribute boolean checked; 1070 attribute DOMString radiogroup; 1071 attribute boolean default; 1072 readonly attribute HTMLElement? command; 1073}; 1074 1075[Constructor(DOMString type, optional RelatedEventInit eventInitDict)] 1076interface RelatedEvent : Event { 1077 readonly attribute EventTarget? relatedTarget; 1078}; 1079 1080dictionary RelatedEventInit : EventInit { 1081 EventTarget? relatedTarget; 1082}; 1083 1084interface HTMLDialogElement : HTMLElement { 1085 attribute boolean open; 1086 attribute DOMString returnValue; 1087 void show(optional (MouseEvent or Element) anchor); 1088 void showModal(optional (MouseEvent or Element) anchor); 1089 void close(optional DOMString returnValue); 1090}; 1091 1092interface HTMLScriptElement : HTMLElement { 1093 attribute DOMString src; 1094 attribute DOMString type; 1095 attribute DOMString charset; 1096 attribute boolean async; 1097 attribute boolean defer; 1098 attribute DOMString? crossOrigin; 1099 attribute DOMString text; 1100 1101 // also has obsolete members 1102}; 1103 1104interface HTMLTemplateElement : HTMLElement { 1105 readonly attribute DocumentFragment content; 1106}; 1107 1108typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; 1109 1110interface HTMLCanvasElement : HTMLElement { 1111 attribute unsigned long width; 1112 attribute unsigned long height; 1113 1114 RenderingContext? getContext(DOMString contextId, any... arguments); 1115 boolean probablySupportsContext(DOMString contextId, any... arguments); 1116 1117 void setContext(RenderingContext context); 1118 CanvasProxy transferControlToProxy(); 1119 1120 DOMString toDataURL(optional DOMString type, any... arguments); 1121 void toBlob(FileCallback? _callback, optional DOMString type, any... arguments); 1122}; 1123 1124[Exposed=(Window,Worker)] 1125interface CanvasProxy { 1126 void setContext(RenderingContext context); 1127}; 1128// CanvasProxy implements Transferable; 1129 1130typedef (HTMLImageElement or 1131 HTMLVideoElement or 1132 HTMLCanvasElement or 1133 CanvasRenderingContext2D or 1134 ImageBitmap) CanvasImageSource; 1135 1136enum CanvasFillRule { "nonzero", "evenodd" }; 1137 1138dictionary CanvasRenderingContext2DSettings { 1139 boolean alpha = true; 1140}; 1141 1142[Constructor(), 1143 Constructor(unsigned long width, unsigned long height), 1144 Exposed=(Window,Worker)] 1145interface CanvasRenderingContext2D { 1146 1147 // back-reference to the canvas 1148 readonly attribute HTMLCanvasElement canvas; 1149 1150 // canvas dimensions 1151 attribute unsigned long width; 1152 attribute unsigned long height; 1153 1154 // for contexts that aren't directly fixed to a specific canvas 1155 void commit(); // push the image to the output bitmap 1156 1157 // state 1158 void save(); // push state on state stack 1159 void restore(); // pop state stack and restore state 1160 1161 // transformations (default transform is the identity matrix) 1162 attribute SVGMatrix currentTransform; 1163 void scale(unrestricted double x, unrestricted double y); 1164 void rotate(unrestricted double angle); 1165 void translate(unrestricted double x, unrestricted double y); 1166 void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); 1167 void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); 1168 void resetTransform(); 1169 1170 // compositing 1171 attribute unrestricted double globalAlpha; // (default 1.0) 1172 attribute DOMString globalCompositeOperation; // (default source-over) 1173 1174 // image smoothing 1175 attribute boolean imageSmoothingEnabled; // (default true) 1176 1177 // colours and styles (see also the CanvasDrawingStyles interface) 1178 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) 1179 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black) 1180 CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); 1181 CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); 1182 CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); 1183 1184 // shadows 1185 attribute unrestricted double shadowOffsetX; // (default 0) 1186 attribute unrestricted double shadowOffsetY; // (default 0) 1187 attribute unrestricted double shadowBlur; // (default 0) 1188 attribute DOMString shadowColor; // (default transparent black) 1189 1190 // rects 1191 void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1192 void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1193 void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1194 1195 // path API (see also CanvasPathMethods) 1196 void beginPath(); 1197 void fill(optional CanvasFillRule fillRule = "nonzero"); 1198 void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); 1199 void stroke(); 1200 void stroke(Path2D path); 1201 void drawFocusIfNeeded(Element element); 1202 void drawFocusIfNeeded(Path2D path, Element element); 1203 void scrollPathIntoView(); 1204 void scrollPathIntoView(Path2D path); 1205 void clip(optional CanvasFillRule fillRule = "nonzero"); 1206 void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); 1207 void resetClip(); 1208 boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); 1209 boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); 1210 boolean isPointInStroke(unrestricted double x, unrestricted double y); 1211 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); 1212 1213 // text (see also the CanvasDrawingStyles interface) 1214 void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1215 void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1216 TextMetrics measureText(DOMString text); 1217 1218 // drawing images 1219 void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); 1220 void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); 1221 void 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); 1222 1223 // hit regions 1224 void addHitRegion(optional HitRegionOptions options); 1225 void removeHitRegion(DOMString id); 1226 void clearHitRegions(); 1227 1228 // pixel manipulation 1229 ImageData createImageData(double sw, double sh); 1230 ImageData createImageData(ImageData imagedata); 1231 ImageData getImageData(double sx, double sy, double sw, double sh); 1232 void putImageData(ImageData imagedata, double dx, double dy); 1233 void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); 1234}; 1235CanvasRenderingContext2D implements CanvasDrawingStyles; 1236CanvasRenderingContext2D implements CanvasPathMethods; 1237 1238[NoInterfaceObject, Exposed=(Window,Worker)] 1239interface CanvasDrawingStyles { 1240 // line caps/joins 1241 attribute unrestricted double lineWidth; // (default 1) 1242 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") 1243 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") 1244 attribute unrestricted double miterLimit; // (default 10) 1245 1246 // dashed lines 1247 void setLineDash(sequence<unrestricted double> segments); // default empty 1248 sequence<unrestricted double> getLineDash(); 1249 attribute unrestricted double lineDashOffset; 1250 1251 // text 1252 attribute DOMString font; // (default 10px sans-serif) 1253 attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start") 1254 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic") 1255 attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit") 1256}; 1257 1258[NoInterfaceObject, Exposed=(Window,Worker)] 1259interface CanvasPathMethods { 1260 // shared path API methods 1261 void closePath(); 1262 void moveTo(unrestricted double x, unrestricted double y); 1263 void lineTo(unrestricted double x, unrestricted double y); 1264 void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y); 1265 void bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y); 1266 void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); 1267 void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation); 1268 void rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); 1269 void arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); 1270 void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); 1271}; 1272 1273[Exposed=(Window,Worker)] 1274interface CanvasGradient { 1275 // opaque object 1276 void addColorStop(double offset, DOMString color); 1277}; 1278 1279[Exposed=(Window,Worker)] 1280interface CanvasPattern { 1281 // opaque object 1282 void setTransform(SVGMatrix transform); 1283}; 1284 1285[Exposed=(Window,Worker)] 1286interface TextMetrics { 1287 // x-direction 1288 readonly attribute double width; // advance width 1289 readonly attribute double actualBoundingBoxLeft; 1290 readonly attribute double actualBoundingBoxRight; 1291 1292 // y-direction 1293 readonly attribute double fontBoundingBoxAscent; 1294 readonly attribute double fontBoundingBoxDescent; 1295 readonly attribute double actualBoundingBoxAscent; 1296 readonly attribute double actualBoundingBoxDescent; 1297 readonly attribute double emHeightAscent; 1298 readonly attribute double emHeightDescent; 1299 readonly attribute double hangingBaseline; 1300 readonly attribute double alphabeticBaseline; 1301 readonly attribute double ideographicBaseline; 1302}; 1303 1304dictionary HitRegionOptions { 1305 Path2D? path = null; 1306 CanvasFillRule fillRule = "nonzero"; 1307 DOMString id = ""; 1308 DOMString? parentID = null; 1309 DOMString cursor = "inherit"; 1310 // for control-backed regions: 1311 Element? control = null; 1312 // for unbacked regions: 1313 DOMString? label = null; 1314 DOMString? role = null; 1315}; 1316 1317[Constructor(unsigned long sw, unsigned long sh), 1318 Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh), 1319 Exposed=(Window,Worker)] 1320interface ImageData { 1321 readonly attribute unsigned long width; 1322 readonly attribute unsigned long height; 1323 readonly attribute Uint8ClampedArray data; 1324}; 1325 1326[Constructor(optional Element scope), Exposed=(Window,Worker)] 1327interface DrawingStyle { }; 1328DrawingStyle implements CanvasDrawingStyles; 1329 1330[Constructor, 1331 Constructor(Path2D path), 1332 Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"), 1333 Constructor(DOMString d), Exposed=(Window,Worker)] 1334interface Path2D { 1335 void addPath(Path2D path, optional SVGMatrix? transformation = null); 1336 void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null); 1337 void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1338 void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); 1339 void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); 1340 void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); 1341}; 1342Path2D implements CanvasPathMethods; 1343 1344partial interface MouseEvent { 1345 readonly attribute DOMString? region; 1346}; 1347 1348partial dictionary MouseEventInit { 1349 DOMString? region; 1350}; 1351 1352partial interface Touch { 1353 readonly attribute DOMString? region; 1354}; 1355 1356[NoInterfaceObject] 1357interface ElementContentEditable { 1358 attribute DOMString contentEditable; 1359 readonly attribute boolean isContentEditable; 1360}; 1361 1362interface DataTransfer { 1363 attribute DOMString dropEffect; 1364 attribute DOMString effectAllowed; 1365 1366 [SameObject] readonly attribute DataTransferItemList items; 1367 1368 void setDragImage(Element image, long x, long y); 1369 1370 /* old interface */ 1371 [SameObject] readonly attribute DOMString[] types; 1372 DOMString getData(DOMString format); 1373 void setData(DOMString format, DOMString data); 1374 void clearData(optional DOMString format); 1375 [SameObject] readonly attribute FileList files; 1376}; 1377 1378interface DataTransferItemList { 1379 readonly attribute unsigned long length; 1380 getter DataTransferItem (unsigned long index); 1381 DataTransferItem? add(DOMString data, DOMString type); 1382 DataTransferItem? add(File data); 1383 void remove(unsigned long index); 1384 void clear(); 1385}; 1386 1387interface DataTransferItem { 1388 readonly attribute DOMString kind; 1389 readonly attribute DOMString type; 1390 void getAsString(FunctionStringCallback? _callback); 1391 File? getAsFile(); 1392}; 1393 1394callback FunctionStringCallback = void (DOMString data); 1395 1396[Constructor(DOMString type, optional DragEventInit eventInitDict)] 1397interface DragEvent : MouseEvent { 1398 readonly attribute DataTransfer? dataTransfer; 1399}; 1400 1401dictionary DragEventInit : MouseEventInit { 1402 DataTransfer? dataTransfer; 1403}; 1404 1405[PrimaryGlobal] 1406/*sealed*/ interface Window : EventTarget { 1407 // the current browsing context 1408 [Unforgeable] readonly attribute WindowProxy window; 1409 [Replaceable] readonly attribute WindowProxy self; 1410 [Unforgeable] readonly attribute Document document; 1411 attribute DOMString name; 1412 [PutForwards=href, Unforgeable] readonly attribute Location location; 1413 readonly attribute History history; 1414 [Replaceable] readonly attribute BarProp locationbar; 1415 [Replaceable] readonly attribute BarProp menubar; 1416 [Replaceable] readonly attribute BarProp personalbar; 1417 [Replaceable] readonly attribute BarProp scrollbars; 1418 [Replaceable] readonly attribute BarProp statusbar; 1419 [Replaceable] readonly attribute BarProp toolbar; 1420 attribute DOMString status; 1421 void close(); 1422 readonly attribute boolean closed; 1423 void stop(); 1424 void focus(); 1425 void blur(); 1426 1427 // other browsing contexts 1428 [Replaceable] readonly attribute WindowProxy frames; 1429 [Replaceable] readonly attribute unsigned long length; 1430 [Unforgeable] readonly attribute WindowProxy top; 1431 attribute any opener; 1432 [Replaceable] readonly attribute WindowProxy parent; 1433 readonly attribute Element? frameElement; 1434 WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false); 1435 getter WindowProxy (unsigned long index); 1436 getter object (DOMString name); 1437 1438 // the user agent 1439 readonly attribute Navigator navigator; 1440 [Replaceable, SameObject] readonly attribute External external; 1441 readonly attribute ApplicationCache applicationCache; 1442 1443 // user prompts 1444 void alert(); 1445 void alert(DOMString message); 1446 boolean confirm(optional DOMString message = ""); 1447 DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); 1448 void print(); 1449 any showModalDialog(DOMString url, optional any argument); // deprecated 1450 1451 long requestAnimationFrame(FrameRequestCallback callback); 1452 void cancelAnimationFrame(long handle); 1453 1454 void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer); 1455 1456 // also has obsolete members 1457}; 1458Window implements GlobalEventHandlers; 1459Window implements WindowEventHandlers; 1460 1461interface BarProp { 1462 attribute boolean visible; 1463}; 1464 1465interface History { 1466 readonly attribute long length; 1467 readonly attribute any state; 1468 void go(optional long delta); 1469 void back(); 1470 void forward(); 1471 void pushState(any data, DOMString title, optional DOMString? url = null); 1472 void replaceState(any data, DOMString title, optional DOMString? url = null); 1473}; 1474 1475[Unforgeable] interface Location { 1476 void assign(DOMString url); 1477 void replace(DOMString url); 1478 void reload(); 1479 1480 [SameObject] readonly attribute DOMString[] ancestorOrigins; 1481}; 1482Location implements URLUtils; 1483 1484[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] 1485interface PopStateEvent : Event { 1486 readonly attribute any state; 1487}; 1488 1489dictionary PopStateEventInit : EventInit { 1490 any state; 1491}; 1492 1493[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] 1494interface HashChangeEvent : Event { 1495 readonly attribute DOMString oldURL; 1496 readonly attribute DOMString newURL; 1497}; 1498 1499dictionary HashChangeEventInit : EventInit { 1500 DOMString oldURL; 1501 DOMString newURL; 1502}; 1503 1504[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] 1505interface PageTransitionEvent : Event { 1506 readonly attribute boolean persisted; 1507}; 1508 1509dictionary PageTransitionEventInit : EventInit { 1510 boolean persisted; 1511}; 1512 1513interface BeforeUnloadEvent : Event { 1514 attribute DOMString returnValue; 1515}; 1516 1517[Exposed=(Window,SharedWorker)] 1518interface ApplicationCache : EventTarget { 1519 1520 // update status 1521 const unsigned short UNCACHED = 0; 1522 const unsigned short IDLE = 1; 1523 const unsigned short CHECKING = 2; 1524 const unsigned short DOWNLOADING = 3; 1525 const unsigned short UPDATEREADY = 4; 1526 const unsigned short OBSOLETE = 5; 1527 readonly attribute unsigned short status; 1528 1529 // updates 1530 void update(); 1531 void abort(); 1532 void swapCache(); 1533 1534 // events 1535 attribute EventHandler onchecking; 1536 attribute EventHandler onerror; 1537 attribute EventHandler onnoupdate; 1538 attribute EventHandler ondownloading; 1539 attribute EventHandler onprogress; 1540 attribute EventHandler onupdateready; 1541 attribute EventHandler oncached; 1542 attribute EventHandler onobsolete; 1543}; 1544 1545[NoInterfaceObject, Exposed=(Window,Worker)] 1546interface NavigatorOnLine { 1547 readonly attribute boolean onLine; 1548}; 1549 1550[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] 1551interface ErrorEvent : Event { 1552 readonly attribute DOMString message; 1553 readonly attribute DOMString filename; 1554 readonly attribute unsigned long lineno; 1555 readonly attribute unsigned long colno; 1556 readonly attribute any error; 1557}; 1558 1559dictionary ErrorEventInit : EventInit { 1560 DOMString message; 1561 DOMString filename; 1562 unsigned long lineno; 1563 unsigned long colno; 1564 any error; 1565}; 1566 1567[TreatNonObjectAsNull] 1568callback EventHandlerNonNull = any (Event event); 1569typedef EventHandlerNonNull? EventHandler; 1570 1571[TreatNonObjectAsNull] 1572callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error); 1573typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; 1574 1575[TreatNonObjectAsNull] 1576callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event); 1577typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; 1578 1579[NoInterfaceObject] 1580interface GlobalEventHandlers { 1581 attribute EventHandler onabort; 1582 attribute EventHandler onautocomplete; 1583 attribute EventHandler onautocompleteerror; 1584 attribute EventHandler onblur; 1585 attribute EventHandler oncancel; 1586 attribute EventHandler oncanplay; 1587 attribute EventHandler oncanplaythrough; 1588 attribute EventHandler onchange; 1589 attribute EventHandler onclick; 1590 attribute EventHandler onclose; 1591 attribute EventHandler oncontextmenu; 1592 attribute EventHandler oncuechange; 1593 attribute EventHandler ondblclick; 1594 attribute EventHandler ondrag; 1595 attribute EventHandler ondragend; 1596 attribute EventHandler ondragenter; 1597 attribute EventHandler ondragexit; 1598 attribute EventHandler ondragleave; 1599 attribute EventHandler ondragover; 1600 attribute EventHandler ondragstart; 1601 attribute EventHandler ondrop; 1602 attribute EventHandler ondurationchange; 1603 attribute EventHandler onemptied; 1604 attribute EventHandler onended; 1605 attribute OnErrorEventHandler onerror; 1606 attribute EventHandler onfocus; 1607 attribute EventHandler oninput; 1608 attribute EventHandler oninvalid; 1609 attribute EventHandler onkeydown; 1610 attribute EventHandler onkeypress; 1611 attribute EventHandler onkeyup; 1612 attribute EventHandler onload; 1613 attribute EventHandler onloadeddata; 1614 attribute EventHandler onloadedmetadata; 1615 attribute EventHandler onloadstart; 1616 attribute EventHandler onmousedown; 1617 [LenientThis] attribute EventHandler onmouseenter; 1618 [LenientThis] attribute EventHandler onmouseleave; 1619 attribute EventHandler onmousemove; 1620 attribute EventHandler onmouseout; 1621 attribute EventHandler onmouseover; 1622 attribute EventHandler onmouseup; 1623 attribute EventHandler onmousewheel; 1624 attribute EventHandler onpause; 1625 attribute EventHandler onplay; 1626 attribute EventHandler onplaying; 1627 attribute EventHandler onprogress; 1628 attribute EventHandler onratechange; 1629 attribute EventHandler onreset; 1630 attribute EventHandler onresize; 1631 attribute EventHandler onscroll; 1632 attribute EventHandler onseeked; 1633 attribute EventHandler onseeking; 1634 attribute EventHandler onselect; 1635 attribute EventHandler onshow; 1636 attribute EventHandler onsort; 1637 attribute EventHandler onstalled; 1638 attribute EventHandler onsubmit; 1639 attribute EventHandler onsuspend; 1640 attribute EventHandler ontimeupdate; 1641 attribute EventHandler ontoggle; 1642 attribute EventHandler onvolumechange; 1643 attribute EventHandler onwaiting; 1644}; 1645 1646[NoInterfaceObject] 1647interface WindowEventHandlers { 1648 attribute EventHandler onafterprint; 1649 attribute EventHandler onbeforeprint; 1650 attribute OnBeforeUnloadEventHandler onbeforeunload; 1651 attribute EventHandler onhashchange; 1652 attribute EventHandler onlanguagechange; 1653 attribute EventHandler onmessage; 1654 attribute EventHandler onoffline; 1655 attribute EventHandler ononline; 1656 attribute EventHandler onpagehide; 1657 attribute EventHandler onpageshow; 1658 attribute EventHandler onpopstate; 1659 attribute EventHandler onstorage; 1660 attribute EventHandler onunload; 1661}; 1662 1663[NoInterfaceObject, Exposed=(Window,Worker)] 1664interface WindowBase64 { 1665 DOMString btoa(DOMString btoa); 1666 DOMString atob(DOMString atob); 1667}; 1668Window implements WindowBase64; 1669 1670[NoInterfaceObject, Exposed=(Window,Worker)] 1671interface WindowTimers { 1672 long setTimeout(Function handler, optional long timeout = 0, any... arguments); 1673 long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); 1674 void clearTimeout(optional long handle = 0); 1675 long setInterval(Function handler, optional long timeout = 0, any... arguments); 1676 long setInterval(DOMString handler, optional long timeout = 0, any... arguments); 1677 void clearInterval(optional long handle = 0); 1678}; 1679Window implements WindowTimers; 1680 1681[NoInterfaceObject] 1682interface WindowModal { 1683 readonly attribute any dialogArguments; 1684 attribute any returnValue; 1685}; 1686 1687interface Navigator { 1688 // objects implementing this interface also implement the interfaces given below 1689}; 1690Navigator implements NavigatorID; 1691Navigator implements NavigatorLanguage; 1692Navigator implements NavigatorOnLine; 1693Navigator implements NavigatorContentUtils; 1694Navigator implements NavigatorStorageUtils; 1695Navigator implements NavigatorPlugins; 1696 1697[NoInterfaceObject, Exposed=(Window,Worker)] 1698interface NavigatorID { 1699 readonly attribute DOMString appCodeName; // constant "Mozilla" 1700 readonly attribute DOMString appName; 1701 readonly attribute DOMString appVersion; 1702 readonly attribute DOMString platform; 1703 readonly attribute DOMString product; // constant "Gecko" 1704 boolean taintEnabled(); // constant false 1705 readonly attribute DOMString userAgent; 1706 readonly attribute DOMString vendorSub; 1707}; 1708 1709[NoInterfaceObject, Exposed=(Window,Worker)] 1710interface NavigatorLanguage { 1711 readonly attribute DOMString? language; 1712 readonly attribute DOMString[] languages; 1713}; 1714 1715[NoInterfaceObject] 1716interface NavigatorContentUtils { 1717 // content handler registration 1718 void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title); 1719 void registerContentHandler(DOMString mimeType, DOMString url, DOMString title); 1720 DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url); 1721 DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url); 1722 void unregisterProtocolHandler(DOMString scheme, DOMString url); 1723 void unregisterContentHandler(DOMString mimeType, DOMString url); 1724}; 1725 1726[NoInterfaceObject] 1727interface NavigatorStorageUtils { 1728 readonly attribute boolean cookieEnabled; 1729 void yieldForStorageUpdates(); 1730}; 1731 1732[NoInterfaceObject] 1733interface NavigatorPlugins { 1734 [SameObject] readonly attribute PluginArray plugins; 1735 [SameObject] readonly attribute MimeTypeArray mimeTypes; 1736 readonly attribute boolean javaEnabled; 1737}; 1738 1739interface PluginArray { 1740 void refresh(optional boolean reload = false); 1741 readonly attribute unsigned long length; 1742 getter Plugin? item(unsigned long index); 1743 getter Plugin? namedItem(DOMString name); 1744}; 1745 1746interface MimeTypeArray { 1747 readonly attribute unsigned long length; 1748 getter MimeType? item(unsigned long index); 1749 getter MimeType? namedItem(DOMString name); 1750}; 1751 1752interface Plugin { 1753 readonly attribute DOMString name; 1754 readonly attribute DOMString description; 1755 readonly attribute DOMString filename; 1756 readonly attribute unsigned long length; 1757 getter MimeType? item(unsigned long index); 1758 getter MimeType? namedItem(DOMString name); 1759}; 1760 1761interface MimeType { 1762 readonly attribute DOMString type; 1763 readonly attribute DOMString description; 1764 readonly attribute DOMString suffixes; // comma-separated 1765 readonly attribute Plugin enabledPlugin; 1766}; 1767 1768interface External { 1769 void AddSearchProvider(DOMString engineURL); 1770 unsigned long IsSearchProviderInstalled(DOMString engineURL); 1771}; 1772 1773[Exposed=(Window,Worker)] 1774interface ImageBitmap { 1775 readonly attribute unsigned long width; 1776 readonly attribute unsigned long height; 1777}; 1778 1779typedef (HTMLImageElement or 1780 HTMLVideoElement or 1781 HTMLCanvasElement or 1782 Blob or 1783 ImageData or 1784 CanvasRenderingContext2D or 1785 ImageBitmap) ImageBitmapSource; 1786 1787[NoInterfaceObject, Exposed=(Window,Worker)] 1788interface ImageBitmapFactories { 1789 Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image); 1790 Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); 1791}; 1792Window implements ImageBitmapFactories; 1793WorkerGlobalScope implements ImageBitmapFactories; 1794 1795[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker)] 1796interface MessageEvent : Event { 1797 readonly attribute any data; 1798 readonly attribute DOMString origin; 1799 readonly attribute DOMString lastEventId; 1800 readonly attribute (WindowProxy or MessagePort)? source; 1801 readonly attribute MessagePort[]? ports; 1802 1803 void initMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (WindowProxy or MessagePort) sourceArg, sequence<MessagePort>? portsArg); 1804}; 1805 1806dictionary MessageEventInit : EventInit { 1807 any data; 1808 DOMString origin; 1809 DOMString lastEventId; 1810 (WindowProxy or MessagePort)? source; 1811 sequence<MessagePort> ports; 1812}; 1813 1814[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] 1815interface EventSource : EventTarget { 1816 readonly attribute DOMString url; 1817 readonly attribute boolean withCredentials; 1818 1819 // ready state 1820 const unsigned short CONNECTING = 0; 1821 const unsigned short OPEN = 1; 1822 const unsigned short CLOSED = 2; 1823 readonly attribute unsigned short readyState; 1824 1825 // networking 1826 attribute EventHandler onopen; 1827 attribute EventHandler onmessage; 1828 attribute EventHandler onerror; 1829 void close(); 1830}; 1831 1832dictionary EventSourceInit { 1833 boolean withCredentials = false; 1834}; 1835 1836enum BinaryType { "blob", "arraybuffer" }; 1837[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=(Window,Worker)] 1838interface WebSocket : EventTarget { 1839 readonly attribute DOMString url; 1840 1841 // ready state 1842 const unsigned short CONNECTING = 0; 1843 const unsigned short OPEN = 1; 1844 const unsigned short CLOSING = 2; 1845 const unsigned short CLOSED = 3; 1846 readonly attribute unsigned short readyState; 1847 readonly attribute unsigned long bufferedAmount; 1848 1849 // networking 1850 attribute EventHandler onopen; 1851 attribute EventHandler onerror; 1852 attribute EventHandler onclose; 1853 readonly attribute DOMString extensions; 1854 readonly attribute DOMString protocol; 1855 void close([Clamp] optional unsigned short code, optional USVString reason); 1856 1857 // messaging 1858 attribute EventHandler onmessage; 1859 attribute BinaryType binaryType; 1860 void send(USVString data); 1861 void send(Blob data); 1862 void send(ArrayBuffer data); 1863 void send(ArrayBufferView data); 1864}; 1865 1866[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)] 1867interface CloseEvent : Event { 1868 readonly attribute boolean wasClean; 1869 readonly attribute unsigned short code; 1870 readonly attribute DOMString reason; 1871}; 1872 1873dictionary CloseEventInit : EventInit { 1874 boolean wasClean; 1875 unsigned short code; 1876 DOMString reason; 1877}; 1878 1879[Constructor, Exposed=(Window,Worker)] 1880interface MessageChannel { 1881 readonly attribute MessagePort port1; 1882 readonly attribute MessagePort port2; 1883}; 1884 1885[Exposed=(Window,Worker)] 1886interface MessagePort : EventTarget { 1887 void postMessage(any message, optional sequence<Transferable> transfer); 1888 void start(); 1889 void close(); 1890 1891 // event handlers 1892 attribute EventHandler onmessage; 1893}; 1894// MessagePort implements Transferable; 1895 1896[Constructor, Exposed=(Window,Worker)] 1897interface PortCollection { 1898 void add(MessagePort port); 1899 void remove(MessagePort port); 1900 void clear(); 1901 void iterate(PortCollectionCallback callback); 1902}; 1903 1904callback PortCollectionCallback = void (MessagePort port); 1905 1906[Constructor(DOMString channel), Exposed=(Window,Worker)] 1907interface BroadcastChannel : EventTarget { 1908 readonly attribute DOMString name; 1909 void postMessage(any message); 1910 void close(); 1911 attribute EventHandler onmessage; 1912}; 1913 1914[Exposed=Worker] 1915interface WorkerGlobalScope : EventTarget { 1916 readonly attribute WorkerGlobalScope self; 1917 readonly attribute WorkerLocation location; 1918 1919 void close(); 1920 attribute OnErrorEventHandler onerror; 1921 attribute EventHandler onlanguagechange; 1922 attribute EventHandler onoffline; 1923 attribute EventHandler ononline; 1924 1925 // also has additional members in a partial interface 1926}; 1927 1928[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] 1929/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { 1930 void postMessage(any message, optional sequence<Transferable> transfer); 1931 attribute EventHandler onmessage; 1932}; 1933 1934[Global=(Worker,SharedWorker),Exposed=SharedWorker] 1935/*sealed*/ interface SharedWorkerGlobalScope : WorkerGlobalScope { 1936 readonly attribute DOMString name; 1937 readonly attribute ApplicationCache applicationCache; 1938 attribute EventHandler onconnect; 1939}; 1940 1941[NoInterfaceObject, Exposed=(Window,Worker)] 1942interface AbstractWorker { 1943 attribute EventHandler onerror; 1944}; 1945 1946[Constructor(DOMString scriptURL), Exposed=(Window,Worker)] 1947interface Worker : EventTarget { 1948 void terminate(); 1949 1950 void postMessage(any message, optional sequence<Transferable> transfer); 1951 attribute EventHandler onmessage; 1952}; 1953Worker implements AbstractWorker; 1954 1955[Constructor(DOMString scriptURL, optional DOMString name), Exposed=(Window,Worker)] 1956interface SharedWorker : EventTarget { 1957 readonly attribute MessagePort port; 1958}; 1959SharedWorker implements AbstractWorker; 1960 1961[Exposed=Worker] 1962partial interface WorkerGlobalScope { // not obsolete 1963 void importScripts(DOMString... urls); 1964 readonly attribute WorkerNavigator navigator; 1965}; 1966WorkerGlobalScope implements WindowTimers; 1967WorkerGlobalScope implements WindowBase64; 1968 1969[Exposed=Worker] 1970interface WorkerNavigator {}; 1971WorkerNavigator implements NavigatorID; 1972WorkerNavigator implements NavigatorLanguage; 1973WorkerNavigator implements NavigatorOnLine; 1974 1975[Exposed=Worker] 1976interface WorkerLocation { }; 1977WorkerLocation implements URLUtilsReadOnly; 1978 1979interface Storage { 1980 readonly attribute unsigned long length; 1981 DOMString? key(unsigned long index); 1982 getter DOMString? getItem(DOMString key); 1983 setter creator void setItem(DOMString key, DOMString value); 1984 deleter void removeItem(DOMString key); 1985 void clear(); 1986}; 1987 1988[NoInterfaceObject] 1989interface WindowSessionStorage { 1990 readonly attribute Storage sessionStorage; 1991}; 1992Window implements WindowSessionStorage; 1993 1994[NoInterfaceObject] 1995interface WindowLocalStorage { 1996 readonly attribute Storage localStorage; 1997}; 1998Window implements WindowLocalStorage; 1999 2000[Constructor(DOMString type, optional StorageEventInit eventInitDict)] 2001interface StorageEvent : Event { 2002 readonly attribute DOMString? key; 2003 readonly attribute DOMString? oldValue; 2004 readonly attribute DOMString? newValue; 2005 readonly attribute DOMString url; 2006 readonly attribute Storage? storageArea; 2007}; 2008 2009dictionary StorageEventInit : EventInit { 2010 DOMString? key; 2011 DOMString? oldValue; 2012 DOMString? newValue; 2013 DOMString url; 2014 Storage? storageArea; 2015}; 2016 2017interface HTMLAppletElement : HTMLElement { 2018 attribute DOMString align; 2019 attribute DOMString alt; 2020 attribute DOMString archive; 2021 attribute DOMString code; 2022 attribute DOMString codeBase; 2023 attribute DOMString height; 2024 attribute unsigned long hspace; 2025 attribute DOMString name; 2026 attribute DOMString _object; // the underscore is not part of the identifier 2027 attribute unsigned long vspace; 2028 attribute DOMString width; 2029}; 2030 2031interface HTMLMarqueeElement : HTMLElement { 2032 attribute DOMString behavior; 2033 attribute DOMString bgColor; 2034 attribute DOMString direction; 2035 attribute DOMString height; 2036 attribute unsigned long hspace; 2037 attribute long loop; 2038 attribute unsigned long scrollAmount; 2039 attribute unsigned long scrollDelay; 2040 attribute boolean trueSpeed; 2041 attribute unsigned long vspace; 2042 attribute DOMString width; 2043 2044 attribute EventHandler onbounce; 2045 attribute EventHandler onfinish; 2046 attribute EventHandler onstart; 2047 2048 void start(); 2049 void stop(); 2050}; 2051 2052interface HTMLFrameSetElement : HTMLElement { 2053 attribute DOMString cols; 2054 attribute DOMString rows; 2055}; 2056HTMLFrameSetElement implements WindowEventHandlers; 2057 2058interface HTMLFrameElement : HTMLElement { 2059 attribute DOMString name; 2060 attribute DOMString scrolling; 2061 attribute DOMString src; 2062 attribute DOMString frameBorder; 2063 attribute DOMString longDesc; 2064 attribute boolean noResize; 2065 readonly attribute Document? contentDocument; 2066 readonly attribute WindowProxy? contentWindow; 2067 2068 [TreatNullAs=EmptyString] attribute DOMString marginHeight; 2069 [TreatNullAs=EmptyString] attribute DOMString marginWidth; 2070}; 2071 2072partial interface HTMLAnchorElement { 2073 attribute DOMString coords; 2074 attribute DOMString charset; 2075 attribute DOMString name; 2076 attribute DOMString rev; 2077 attribute DOMString shape; 2078}; 2079 2080partial interface HTMLAreaElement { 2081 attribute boolean noHref; 2082}; 2083 2084partial interface HTMLBodyElement { 2085 [TreatNullAs=EmptyString] attribute DOMString text; 2086 [TreatNullAs=EmptyString] attribute DOMString link; 2087 [TreatNullAs=EmptyString] attribute DOMString vLink; 2088 [TreatNullAs=EmptyString] attribute DOMString aLink; 2089 [TreatNullAs=EmptyString] attribute DOMString bgColor; 2090 attribute DOMString background; 2091}; 2092 2093partial interface HTMLBRElement { 2094 attribute DOMString clear; 2095}; 2096 2097partial interface HTMLTableCaptionElement { 2098 attribute DOMString align; 2099}; 2100 2101partial interface HTMLTableColElement { 2102 attribute DOMString align; 2103 attribute DOMString ch; 2104 attribute DOMString chOff; 2105 attribute DOMString vAlign; 2106 attribute DOMString width; 2107}; 2108 2109interface HTMLDirectoryElement : HTMLElement { 2110 attribute boolean compact; 2111}; 2112 2113partial interface HTMLDivElement { 2114 attribute DOMString align; 2115}; 2116 2117partial interface HTMLDListElement { 2118 attribute boolean compact; 2119}; 2120 2121partial interface HTMLEmbedElement { 2122 attribute DOMString align; 2123 attribute DOMString name; 2124}; 2125 2126interface HTMLFontElement : HTMLElement { 2127 [TreatNullAs=EmptyString] attribute DOMString color; 2128 attribute DOMString face; 2129 attribute DOMString size; 2130}; 2131 2132partial interface HTMLHeadingElement { 2133 attribute DOMString align; 2134}; 2135 2136partial interface HTMLHRElement { 2137 attribute DOMString align; 2138 attribute DOMString color; 2139 attribute boolean noShade; 2140 attribute DOMString size; 2141 attribute DOMString width; 2142}; 2143 2144partial interface HTMLHtmlElement { 2145 attribute DOMString version; 2146}; 2147 2148partial interface HTMLIFrameElement { 2149 attribute DOMString align; 2150 attribute DOMString scrolling; 2151 attribute DOMString frameBorder; 2152 attribute DOMString longDesc; 2153 2154 [TreatNullAs=EmptyString] attribute DOMString marginHeight; 2155 [TreatNullAs=EmptyString] attribute DOMString marginWidth; 2156}; 2157 2158partial interface HTMLImageElement { 2159 attribute DOMString name; 2160 attribute DOMString lowsrc; 2161 attribute DOMString align; 2162 attribute unsigned long hspace; 2163 attribute unsigned long vspace; 2164 attribute DOMString longDesc; 2165 2166 [TreatNullAs=EmptyString] attribute DOMString border; 2167}; 2168 2169partial interface HTMLInputElement { 2170 attribute DOMString align; 2171 attribute DOMString useMap; 2172}; 2173 2174partial interface HTMLLegendElement { 2175 attribute DOMString align; 2176}; 2177 2178partial interface HTMLLIElement { 2179 attribute DOMString type; 2180}; 2181 2182partial interface HTMLLinkElement { 2183 attribute DOMString charset; 2184 attribute DOMString rev; 2185 attribute DOMString target; 2186}; 2187 2188partial interface HTMLMenuElement { 2189 attribute boolean compact; 2190}; 2191 2192partial interface HTMLMetaElement { 2193 attribute DOMString scheme; 2194}; 2195 2196partial interface HTMLObjectElement { 2197 attribute DOMString align; 2198 attribute DOMString archive; 2199 attribute DOMString code; 2200 attribute boolean declare; 2201 attribute unsigned long hspace; 2202 attribute DOMString standby; 2203 attribute unsigned long vspace; 2204 attribute DOMString codeBase; 2205 attribute DOMString codeType; 2206 2207 [TreatNullAs=EmptyString] attribute DOMString border; 2208}; 2209 2210partial interface HTMLOListElement { 2211 attribute boolean compact; 2212}; 2213 2214partial interface HTMLParagraphElement { 2215 attribute DOMString align; 2216}; 2217 2218partial interface HTMLParamElement { 2219 attribute DOMString type; 2220 attribute DOMString valueType; 2221}; 2222 2223partial interface HTMLPreElement { 2224 attribute long width; 2225}; 2226 2227partial interface HTMLScriptElement { 2228 attribute DOMString event; 2229 attribute DOMString htmlFor; 2230}; 2231 2232partial interface HTMLTableElement { 2233 attribute DOMString align; 2234 attribute DOMString border; 2235 attribute DOMString frame; 2236 attribute DOMString rules; 2237 attribute DOMString summary; 2238 attribute DOMString width; 2239 2240 [TreatNullAs=EmptyString] attribute DOMString bgColor; 2241 [TreatNullAs=EmptyString] attribute DOMString cellPadding; 2242 [TreatNullAs=EmptyString] attribute DOMString cellSpacing; 2243}; 2244 2245partial interface HTMLTableSectionElement { 2246 attribute DOMString align; 2247 attribute DOMString ch; 2248 attribute DOMString chOff; 2249 attribute DOMString vAlign; 2250}; 2251 2252partial interface HTMLTableCellElement { 2253 attribute DOMString align; 2254 attribute DOMString axis; 2255 attribute DOMString height; 2256 attribute DOMString width; 2257 2258 attribute DOMString ch; 2259 attribute DOMString chOff; 2260 attribute boolean noWrap; 2261 attribute DOMString vAlign; 2262 2263 [TreatNullAs=EmptyString] attribute DOMString bgColor; 2264}; 2265 2266partial interface HTMLTableDataCellElement { 2267 attribute DOMString abbr; 2268}; 2269 2270partial interface HTMLTableRowElement { 2271 attribute DOMString align; 2272 attribute DOMString ch; 2273 attribute DOMString chOff; 2274 attribute DOMString vAlign; 2275 2276 [TreatNullAs=EmptyString] attribute DOMString bgColor; 2277}; 2278 2279partial interface HTMLUListElement { 2280 attribute boolean compact; 2281 attribute DOMString type; 2282}; 2283 2284partial interface Document { 2285 [TreatNullAs=EmptyString] attribute DOMString fgColor; 2286 [TreatNullAs=EmptyString] attribute DOMString linkColor; 2287 [TreatNullAs=EmptyString] attribute DOMString vlinkColor; 2288 [TreatNullAs=EmptyString] attribute DOMString alinkColor; 2289 [TreatNullAs=EmptyString] attribute DOMString bgColor; 2290 2291 readonly attribute HTMLCollection anchors; 2292 readonly attribute HTMLCollection applets; 2293 2294 void clear(); 2295 void captureEvents(); 2296 void releaseEvents(); 2297 2298 readonly attribute HTMLAllCollection all; 2299}; 2300 2301partial interface Window { 2302 void captureEvents(); 2303 void releaseEvents(); 2304}; 2305 2306