Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/dom/resources/interfaces.idl

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

Powered by Google App Engine
This is Rietveld 408576698