webidl 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -228,35 +228,47 @@ module WebIDL
228
228
  / identifier
229
229
  / string
230
230
  / other
231
+ / "..."
231
232
  / ":"
232
233
  / "::"
233
234
  / ";"
234
235
  / "<"
235
236
  / "="
236
237
  / ">"
237
- / "DOMString"
238
- / "FALSE"
239
- / "Object"
240
- / "TRUE"
238
+ / "?"
239
+ / "false"
240
+ / "object"
241
+ / "true"
241
242
  / "any"
242
243
  / "attribute"
243
244
  / "boolean"
245
+ / "caller"
244
246
  / "const"
247
+ / "creator"
248
+ / "deleter"
249
+ / "double"
245
250
  / "exception"
246
251
  / "float"
247
252
  / "getraises"
253
+ / "getter"
254
+ / "implements"
248
255
  / "in"
249
256
  / "interface"
250
257
  / "long"
251
258
  / "module"
252
259
  / "octet"
260
+ / "omittable"
261
+ / "optional"
253
262
  / "raises"
254
263
  / "sequence"
255
264
  / "setraises"
265
+ / "setter"
256
266
  / "short"
267
+ / "DOMString"
268
+ / "stringifier"
257
269
  / "typedef"
258
270
  / "unsigned"
259
- / "valuetype"
271
+ / "void"
260
272
  end
261
273
 
262
274
  rule OtherOrComma
@@ -264,10 +276,11 @@ module WebIDL
264
276
  end
265
277
 
266
278
  rule Type
267
- NullableType
268
- / ScopedName
269
- / "any"
270
- / "object"
279
+ type:( NullableType
280
+ / ScopedName
281
+ / "any" # not sure why these two are here, since
282
+ / "object" # they will be caught by ScopedName anyway..
283
+ ) array:OptionalArray <ParseTree::Type>
271
284
  end
272
285
 
273
286
  #
@@ -300,6 +313,14 @@ module WebIDL
300
313
  "?"?
301
314
  end
302
315
 
316
+ #
317
+ # added: can't find anything about this in the spec's LL grammar
318
+ #
319
+
320
+ rule OptionalArray
321
+ "[]"?
322
+ end
323
+
303
324
  rule NonSpace
304
325
  (!' ' .)
305
326
  end
@@ -138,6 +138,17 @@ describe WebIDL::Ast do
138
138
  interface.inherits.first.qualified_name.should == "::foo"
139
139
  end
140
140
 
141
+ it "creates an interface with an array type member" do
142
+ interface = parse(fixture("interface_with_array_member.idl")).build.first
143
+ interface.should be_kind_of(WebIDL::Ast::Interface)
144
+
145
+ attr = interface.members.first
146
+ attr.should be_kind_of(WebIDL::Ast::Attribute)
147
+
148
+ attr.type.should be_kind_of(WebIDL::Ast::Type)
149
+ attr.type.name.should == :UnsignedShortArray
150
+ end
151
+
141
152
  it "creates a framework from the example in the WebIDL spec" do
142
153
  mod = parse(fixture("framework.idl")).build.first
143
154
  mod.definitions.size.should == 4
@@ -177,12 +188,12 @@ describe WebIDL::Ast do
177
188
  first.name.should == "ERR_NOT_FOUND"
178
189
  first.qualified_name.should == '::framework::FrameworkException::ERR_NOT_FOUND'
179
190
  first.type.should be_kind_of(WebIDL::Ast::Type)
180
- first.type.name.should == :long
191
+ first.type.name.should == :Long
181
192
  first.value.should == 1
182
193
 
183
194
  last.should be_kind_of(WebIDL::Ast::Field)
184
195
  last.type.should be_kind_of(WebIDL::Ast::Type)
185
- last.type.name.should == :long
196
+ last.type.name.should == :Long
186
197
  last.name.should == "code"
187
198
  end
188
199
 
@@ -1,3 +1,70 @@
1
+ interface Example {
2
+ // this is an IDL definition
3
+ };
4
+
5
+ interface HTMLCollection {
6
+ readonly attribute unsigned long length;
7
+ caller getter object item(in unsigned long index); // only returns Element
8
+ caller getter object namedItem(in DOMString name); // only returns Element
9
+ };
10
+
11
+ interface HTMLAllCollection : HTMLCollection {
12
+ // inherits length and item()
13
+ caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
14
+ HTMLAllCollection tags(in DOMString tagName);
15
+ };
16
+
17
+ interface HTMLFormControlsCollection : HTMLCollection {
18
+ // inherits length and item()
19
+ caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
20
+ };
21
+
22
+ interface RadioNodeList : NodeList {
23
+ attribute DOMString value;
24
+ };
25
+
26
+ interface HTMLOptionsCollection : HTMLCollection {
27
+ // inherits item()
28
+ attribute unsigned long length; // overrides inherited length
29
+ caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
30
+ void add(in HTMLElement element, in optional HTMLElement before);
31
+ void add(in HTMLElement element, in long before);
32
+ void remove(in long index);
33
+ };
34
+
35
+ interface HTMLPropertiesCollection : HTMLCollection {
36
+ // inherits length and item()
37
+ caller getter PropertyNodeList namedItem(in DOMString name); // overrides inherited namedItem()
38
+ readonly attribute DOMStringList names;
39
+ };
40
+
41
+ typedef sequence<any> PropertyValueArray;
42
+
43
+ interface PropertyNodeList : NodeList {
44
+ readonly attribute PropertyValueArray values;
45
+ };
46
+
47
+ interface DOMTokenList {
48
+ readonly attribute unsigned long length;
49
+ getter DOMString item(in unsigned long index);
50
+ boolean contains(in DOMString token);
51
+ void add(in DOMString token);
52
+ void remove(in DOMString token);
53
+ boolean toggle(in DOMString token);
54
+ stringifier DOMString ();
55
+ };
56
+
57
+ interface DOMSettableTokenList : DOMTokenList {
58
+ attribute DOMString value;
59
+ };
60
+
61
+ interface DOMStringMap {
62
+ getter DOMString (in DOMString name);
63
+ setter void (in DOMString name, in DOMString value);
64
+ creator void (in DOMString name, in DOMString value);
65
+ deleter void (in DOMString name);
66
+ };
67
+
1
68
  [OverrideBuiltins]
2
69
  interface HTMLDocument {
3
70
  // resource metadata management
@@ -14,6 +81,7 @@ interface HTMLDocument {
14
81
  readonly attribute DOMString readyState;
15
82
 
16
83
  // DOM tree accessors
84
+ getter any (in DOMString name);
17
85
  attribute DOMString title;
18
86
  attribute DOMString dir;
19
87
  attribute HTMLElement body;
@@ -26,8 +94,7 @@ interface HTMLDocument {
26
94
  readonly attribute HTMLCollection scripts;
27
95
  NodeList getElementsByName(in DOMString elementName);
28
96
  NodeList getElementsByClassName(in DOMString classNames);
29
- NodeList getItems(in optional DOMString typeNames);
30
- getter any (in DOMString name);
97
+ NodeList getItems(in optional DOMString typeNames); // microdata
31
98
 
32
99
  // dynamic markup insertion
33
100
  attribute DOMString innerHTML;
@@ -38,6 +105,7 @@ interface HTMLDocument {
38
105
  void writeln(in DOMString... text);
39
106
 
40
107
  // user interaction
108
+ readonly attribute WindowProxy defaultView;
41
109
  Selection getSelection();
42
110
  readonly attribute Element activeElement;
43
111
  boolean hasFocus();
@@ -60,6 +128,9 @@ interface HTMLDocument {
60
128
  attribute Function onchange;
61
129
  attribute Function onclick;
62
130
  attribute Function oncontextmenu;
131
+
132
+ attribute Function oncuechange;
133
+
63
134
  attribute Function ondblclick;
64
135
  attribute Function ondrag;
65
136
  attribute Function ondragend;
@@ -110,135 +181,16 @@ interface HTMLDocument {
110
181
  };
111
182
  Document implements HTMLDocument;
112
183
 
113
- interface HTMLMarqueeElement : HTMLElement {
114
- attribute DOMString behavior;
115
- attribute DOMString bgColor;
116
- attribute DOMString direction;
117
- attribute DOMString height;
118
- attribute unsigned long hspace;
119
- attribute long loop;
120
- attribute unsigned long scrollAmount;
121
- attribute unsigned long scrollDelay;
122
- attribute DOMString trueSpeed;
123
- attribute unsigned long vspace;
124
- attribute DOMString width;
125
-
126
- attribute Function onbounce;
127
- attribute Function onfinish;
128
- attribute Function onstart;
129
-
130
- void start();
131
- void stop();
132
- };interface HTMLFrameSetElement : HTMLElement {
133
- attribute DOMString cols;
134
- attribute DOMString rows;
135
- attribute Function onafterprint;
136
- attribute Function onbeforeprint;
137
- attribute Function onbeforeunload;
138
- attribute Function onblur;
139
- attribute Function onerror;
140
- attribute Function onfocus;
141
- attribute Function onhashchange;
142
- attribute Function onload;
143
- attribute Function onmessage;
144
- attribute Function onoffline;
145
- attribute Function ononline;
146
- attribute Function onpagehide;
147
- attribute Function onpageshow;
148
- attribute Function onpopstate;
149
- attribute Function onredo;
150
- attribute Function onresize;
151
- attribute Function onstorage;
152
- attribute Function onundo;
153
- attribute Function onunload;
154
- };interface HTMLFrameElement : HTMLElement {
155
- attribute DOMString frameBorder;
156
- attribute DOMString longDesc;
157
- attribute DOMString marginHeight;
158
- attribute DOMString marginWidth;
159
- attribute DOMString name;
160
- attribute boolean noResize;
161
- attribute DOMString scrolling;
162
- attribute DOMString src;
163
- readonly attribute Document contentDocument;
164
- };[Supplemental]
165
- interface HTMLAnchorElement {
166
- attribute DOMString coords;
167
- attribute DOMString charset;
168
- attribute DOMString name;
169
- attribute DOMString rev;
170
- attribute DOMString shape;
171
- };[Supplemental]
172
- interface HTMLAreaElement {
173
- attribute boolean noHref;
174
- };interface HTMLBaseFontElement : HTMLElement {
175
- attribute DOMString color;
176
- attribute DOMString face;
177
- attribute long size;
178
- };[Supplemental]
179
- interface HTMLBodyElement {
180
- attribute DOMString text;
181
- attribute DOMString bgColor;
182
- attribute DOMString background;
183
- attribute DOMString link;
184
- attribute DOMString vLink;
185
- attribute DOMString aLink;
186
- };[Supplemental]
187
- interface HTMLBRElement {
188
- attribute DOMString clear;
189
- };[Supplemental]
190
- interface HTMLTableCaptionElement {
191
- attribute DOMString align;
192
- };[Supplemental]
193
- interface HTMLTableColElement {
194
- attribute DOMString align;
195
- attribute DOMString ch;
196
- attribute DOMString chOff;
197
- attribute DOMString vAlign;
198
- attribute DOMString width;
199
- };[Supplemental, NoInterfaceObject]
184
+ [Supplemental, NoInterfaceObject]
200
185
  interface DOMHTMLImplementation {
201
186
  Document createHTMLDocument(in DOMString title);
202
187
  };
203
- DOMImplementation implements DOMHTMLImplementation;interface HTMLDirectoryElement : HTMLElement {
204
- attribute DOMString compact;
205
- };[Supplemental]
206
- interface HTMLDivElement {
207
- attribute DOMString align;
208
- };[Supplemental]
209
- interface HTMLDListElement {
210
- attribute DOMString compact;
211
- };[Supplemental]
212
- interface HTMLEmbedElement {
213
- attribute DOMString align;
214
- attribute DOMString name;
215
- };interface HTMLFontElement : HTMLElement {
216
- attribute DOMString color;
217
- attribute DOMString face;
218
- attribute DOMString size;
219
- };[Supplemental]
220
- interface HTMLHeadingElement {
221
- attribute DOMString align;
222
- };[Supplemental]
223
- interface HTMLHeadElement {
224
- attribute DOMString profile;
225
- };[Supplemental]
226
- interface HTMLHRElement {
227
- attribute DOMString align;
228
- attribute boolean noShade;
229
- attribute DOMString size;
230
- attribute DOMString width;
231
- };[Supplemental]
232
- interface HTMLHtmlElement {
233
- attribute DOMString version;
234
- };[Supplemental]
235
- interface HTMLIFrameElement {
236
- attribute DOMString align;
237
- attribute DOMString frameBorder;
238
- attribute DOMString longDesc;
239
- attribute DOMString marginHeight;
240
- attribute DOMString marginWidth;
241
- attribute DOMString scrolling;
188
+ DOMImplementation implements DOMHTMLImplementation;
189
+
190
+ [Supplemental, NoInterfaceObject]
191
+ interface XMLDocumentLoader {
192
+ attribute boolean async;
193
+ boolean load(in DOMString url);
242
194
  };
243
195
 
244
196
  interface HTMLElement : Element {
@@ -263,7 +215,7 @@ interface HTMLElement : Element {
263
215
  attribute boolean itemScope;
264
216
  attribute DOMString itemType;
265
217
  attribute DOMString itemId;
266
- attribute DOMString itemRef;
218
+ [PutForwards=value] readonly attribute DOMSettableTokenList itemRef;
267
219
  [PutForwards=value] readonly attribute DOMSettableTokenList itemProp;
268
220
  readonly attribute HTMLPropertiesCollection properties;
269
221
  attribute any itemValue;
@@ -302,6 +254,9 @@ interface HTMLElement : Element {
302
254
  attribute Function onchange;
303
255
  attribute Function onclick;
304
256
  attribute Function oncontextmenu;
257
+
258
+ attribute Function oncuechange;
259
+
305
260
  attribute Function ondblclick;
306
261
  attribute Function ondrag;
307
262
  attribute Function ondragend;
@@ -351,122 +306,22 @@ interface HTMLElement : Element {
351
306
  attribute Function onwaiting;
352
307
  };
353
308
 
354
- interface HTMLUnknownElement : HTMLElement { };[Supplemental]
355
- interface HTMLImageElement {
356
- attribute DOMString name;
357
- attribute DOMString align;
358
- attribute DOMString border;
359
- attribute unsigned long hspace;
360
- attribute DOMString longDesc;
361
- attribute unsigned long vspace;
362
- };[Supplemental]
363
- interface HTMLInputElement {
364
- attribute DOMString align;
365
- attribute DOMString useMap;
366
- };[Supplemental]
367
- interface HTMLLegendElement {
368
- attribute DOMString align;
369
- };[Supplemental]
370
- interface HTMLLIElement {
371
- attribute DOMString type;
372
- };[Supplemental]
373
- interface HTMLLinkElement {
374
- attribute DOMString charset;
375
- attribute DOMString rev;
376
- attribute DOMString target;
377
- };[Supplemental]
378
- interface HTMLMenuElement {
379
- attribute DOMString compact;
380
- };[Supplemental]
381
- interface HTMLMetaElement {
382
- attribute DOMString scheme;
383
- };[Supplemental]
384
- interface HTMLObjectElement {
385
- attribute DOMString align;
386
- attribute DOMString archive;
387
- attribute DOMString border;
388
- attribute DOMString code;
389
- attribute DOMString codeBase;
390
- attribute DOMString codeType;
391
- attribute boolean declare;
392
- attribute unsigned long hspace;
393
- attribute DOMString standby;
394
- attribute unsigned long vspace;
395
- };[Supplemental]
396
- interface HTMLOListElement {
397
- attribute DOMString compact;
398
- attribute DOMString type;
399
- };[Supplemental]
400
- interface HTMLParagraphElement {
401
- attribute DOMString align;
402
- };interface HTMLHtmlElement : HTMLElement {};[Supplemental]
403
- interface HTMLParamElement {
404
- attribute DOMString type;
405
- attribute DOMString valueType;
406
- };[Supplemental]
407
- interface HTMLPreElement {
408
- attribute unsigned long width;
409
- };[Supplemental]
410
- interface HTMLScriptElement {
411
- attribute DOMString event;
412
- attribute DOMString htmlFor;
413
- };[Supplemental]
414
- interface HTMLTableElement {
415
- attribute DOMString align;
416
- attribute DOMString bgColor;
417
- attribute DOMString border;
418
- attribute DOMString cellPadding;
419
- attribute DOMString cellSpacing;
420
- attribute DOMString frame;
421
- attribute DOMString rules;
422
- attribute DOMString width;
423
- };[Supplemental]
424
- interface HTMLTableSectionElement {
425
- attribute DOMString align;
426
- attribute DOMString ch;
427
- attribute DOMString chOff;
428
- attribute DOMString vAlign;
429
- };[Supplemental]
430
- interface HTMLTableCellElement {
431
- attribute DOMString abbr;
432
- attribute DOMString align;
433
- attribute DOMString axis;
434
- attribute DOMString bgColor;
435
- attribute DOMString ch;
436
- attribute DOMString chOff;
437
- attribute DOMString height;
438
- attribute boolean noWrap;
439
- attribute DOMString vAlign;
440
- attribute DOMString width;
441
- };[Supplemental]
442
- interface HTMLTableRowElement {
443
- attribute DOMString align;
444
- attribute DOMString bgColor;
445
- attribute DOMString ch;
446
- attribute DOMString chOff;
447
- attribute DOMString vAlign;
448
- };[Supplemental]
449
- interface HTMLUListElement {
450
- attribute DOMString compact;
451
- attribute DOMString type;
452
- };[Supplemental]
453
- interface HTMLDocument {
454
- attribute DOMString fgColor;
455
- attribute DOMString bgColor;
456
- attribute DOMString linkColor;
457
- attribute DOMString vlinkColor;
458
- attribute DOMString alinkColor;
309
+ interface HTMLUnknownElement : HTMLElement { };
459
310
 
460
- readonly attribute HTMLCollection anchors;
461
- readonly attribute HTMLCollection applets;
311
+ interface HTMLHtmlElement : HTMLElement {};
462
312
 
463
- readonly attribute HTMLAllCollection all;
464
- };interface HTMLHeadElement : HTMLElement {};interface HTMLTitleElement : HTMLElement {
313
+ interface HTMLHeadElement : HTMLElement {};
314
+
315
+ interface HTMLTitleElement : HTMLElement {
465
316
  attribute DOMString text;
466
- };interface HTMLBaseElement : HTMLElement {
317
+ };
318
+
319
+ interface HTMLBaseElement : HTMLElement {
467
320
  attribute DOMString href;
468
321
  attribute DOMString target;
469
- };interface HTMLLinkElement : HTMLElement {
322
+ };
323
+
324
+ interface HTMLLinkElement : HTMLElement {
470
325
  attribute boolean disabled;
471
326
  attribute DOMString href;
472
327
  attribute DOMString rel;
@@ -474,30 +329,34 @@ interface HTMLDocument {
474
329
  attribute DOMString media;
475
330
  attribute DOMString hreflang;
476
331
  attribute DOMString type;
477
- attribute DOMString sizes;
332
+ [PutForwards=value] readonly attribute DOMSettableTokenList sizes;
478
333
  };
479
- HTMLLinkElement implements LinkStyle;interface HTMLMetaElement : HTMLElement {
334
+ HTMLLinkElement implements LinkStyle;
335
+
336
+ interface HTMLMetaElement : HTMLElement {
480
337
  attribute DOMString name;
481
338
  attribute DOMString httpEquiv;
482
339
  attribute DOMString content;
483
- };interface HTMLStyleElement : HTMLElement {
340
+ };
341
+
342
+ interface HTMLStyleElement : HTMLElement {
484
343
  attribute boolean disabled;
485
344
  attribute DOMString media;
486
345
  attribute DOMString type;
487
346
  attribute boolean scoped;
488
347
  };
489
- HTMLStyleElement implements LinkStyle;interface HTMLCollection {
490
- readonly attribute unsigned long length;
491
- caller getter Element item(in unsigned long index);
492
- caller getter Element namedItem(in DOMString name);
493
- };interface HTMLScriptElement : HTMLElement {
348
+ HTMLStyleElement implements LinkStyle;
349
+
350
+ interface HTMLScriptElement : HTMLElement {
494
351
  attribute DOMString src;
495
352
  attribute boolean async;
496
353
  attribute boolean defer;
497
354
  attribute DOMString type;
498
355
  attribute DOMString charset;
499
356
  attribute DOMString text;
500
- };interface HTMLBodyElement : HTMLElement {
357
+ };
358
+
359
+ interface HTMLBodyElement : HTMLElement {
501
360
  attribute Function onafterprint;
502
361
  attribute Function onbeforeprint;
503
362
  attribute Function onbeforeunload;
@@ -517,27 +376,49 @@ HTMLStyleElement implements LinkStyle;interface HTMLCollection {
517
376
  attribute Function onstorage;
518
377
  attribute Function onundo;
519
378
  attribute Function onunload;
520
- };interface HTMLHeadingElement : HTMLElement {};interface HTMLParagraphElement : HTMLElement {};interface HTMLHRElement : HTMLElement {};interface HTMLBRElement : HTMLElement {};interface HTMLPreElement : HTMLElement {};interface HTMLQuoteElement : HTMLElement {
379
+ };
380
+
381
+ interface HTMLHeadingElement : HTMLElement {};
382
+
383
+ interface HTMLParagraphElement : HTMLElement {};
384
+
385
+ interface HTMLHRElement : HTMLElement {};
386
+
387
+ interface HTMLPreElement : HTMLElement {};
388
+
389
+ interface HTMLQuoteElement : HTMLElement {
521
390
  attribute DOMString cite;
522
- };interface HTMLOListElement : HTMLElement {
391
+ };
392
+
393
+ interface HTMLOListElement : HTMLElement {
523
394
  attribute boolean reversed;
524
395
  attribute long start;
525
- };interface HTMLUListElement : HTMLElement {};interface HTMLAllCollection : HTMLCollection {
526
- // inherits length and item()
527
- caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
528
- HTMLAllCollection tags(in DOMString tagName);
529
- };interface HTMLLIElement : HTMLElement {
396
+ };
397
+
398
+ interface HTMLUListElement : HTMLElement {};
399
+
400
+ interface HTMLLIElement : HTMLElement {
530
401
  attribute long value;
531
- };interface HTMLDListElement : HTMLElement {};interface HTMLDivElement : HTMLElement {};interface HTMLAnchorElement : HTMLElement {
402
+ };
403
+
404
+ interface HTMLDListElement : HTMLElement {};
405
+
406
+ interface HTMLDivElement : HTMLElement {};
407
+
408
+ interface HTMLAnchorElement : HTMLElement {
532
409
  stringifier attribute DOMString href;
533
410
  attribute DOMString target;
411
+
534
412
  attribute DOMString ping;
413
+
535
414
  attribute DOMString rel;
536
415
  readonly attribute DOMTokenList relList;
537
416
  attribute DOMString media;
538
417
  attribute DOMString hreflang;
539
418
  attribute DOMString type;
540
419
 
420
+ attribute DOMString text;
421
+
541
422
  // URL decomposition IDL attributes
542
423
  attribute DOMString protocol;
543
424
  attribute DOMString host;
@@ -546,25 +427,24 @@ HTMLStyleElement implements LinkStyle;interface HTMLCollection {
546
427
  attribute DOMString pathname;
547
428
  attribute DOMString search;
548
429
  attribute DOMString hash;
549
- };interface HTMLTimeElement : HTMLElement {
430
+ };
431
+
432
+ interface HTMLTimeElement : HTMLElement {
550
433
  attribute DOMString dateTime;
551
434
  attribute boolean pubDate;
552
435
  readonly attribute Date valueAsDate;
553
- };interface HTMLProgressElement : HTMLElement {
554
- attribute float value;
555
- attribute float max;
556
- readonly attribute float position;
557
- };interface HTMLMeterElement : HTMLElement {
558
- attribute float value;
559
- attribute float min;
560
- attribute float max;
561
- attribute float low;
562
- attribute float high;
563
- attribute float optimum;
564
- };interface HTMLSpanElement : HTMLElement {};interface HTMLModElement : HTMLElement {
436
+ };
437
+
438
+ interface HTMLSpanElement : HTMLElement {};
439
+
440
+ interface HTMLBRElement : HTMLElement {};
441
+
442
+ interface HTMLModElement : HTMLElement {
565
443
  attribute DOMString cite;
566
444
  attribute DOMString dateTime;
567
- };[NamedConstructor=Image(),
445
+ };
446
+
447
+ [NamedConstructor=Image(),
568
448
  NamedConstructor=Image(in unsigned long width),
569
449
  NamedConstructor=Image(in unsigned long width, in unsigned long height)]
570
450
  interface HTMLImageElement : HTMLElement {
@@ -577,28 +457,28 @@ interface HTMLImageElement : HTMLElement {
577
457
  readonly attribute unsigned long naturalWidth;
578
458
  readonly attribute unsigned long naturalHeight;
579
459
  readonly attribute boolean complete;
580
- };interface HTMLFormControlsCollection : HTMLCollection {
581
- // inherits length and item()
582
- caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
583
460
  };
584
461
 
585
- interface RadioNodeList : NodeList {
586
- attribute DOMString value;
587
- };interface HTMLIFrameElement : HTMLElement {
462
+ interface HTMLIFrameElement : HTMLElement {
588
463
  attribute DOMString src;
464
+ attribute DOMString srcdoc;
589
465
  attribute DOMString name;
590
- attribute DOMString sandbox;
466
+ [PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
591
467
  attribute boolean seamless;
592
468
  attribute DOMString width;
593
469
  attribute DOMString height;
594
470
  readonly attribute Document contentDocument;
595
471
  readonly attribute WindowProxy contentWindow;
596
- };interface HTMLEmbedElement : HTMLElement {
472
+ };
473
+
474
+ interface HTMLEmbedElement : HTMLElement {
597
475
  attribute DOMString src;
598
476
  attribute DOMString type;
599
477
  attribute DOMString width;
600
478
  attribute DOMString height;
601
- };interface HTMLObjectElement : HTMLElement {
479
+ };
480
+
481
+ interface HTMLObjectElement : HTMLElement {
602
482
  attribute DOMString data;
603
483
  attribute DOMString type;
604
484
  attribute DOMString name;
@@ -614,22 +494,41 @@ interface RadioNodeList : NodeList {
614
494
  readonly attribute DOMString validationMessage;
615
495
  boolean checkValidity();
616
496
  void setCustomValidity(in DOMString error);
617
- };interface HTMLParamElement : HTMLElement {
497
+ };
498
+
499
+ interface HTMLParamElement : HTMLElement {
618
500
  attribute DOMString name;
619
501
  attribute DOMString value;
620
- };interface HTMLVideoElement : HTMLMediaElement {
502
+ };
503
+
504
+ interface HTMLVideoElement : HTMLMediaElement {
621
505
  attribute DOMString width;
622
506
  attribute DOMString height;
623
507
  readonly attribute unsigned long videoWidth;
624
508
  readonly attribute unsigned long videoHeight;
625
509
  attribute DOMString poster;
626
- };[NamedConstructor=Audio(),
510
+ };
511
+
512
+ [NamedConstructor=Audio(),
627
513
  NamedConstructor=Audio(in DOMString src)]
628
- interface HTMLAudioElement : HTMLMediaElement {};interface HTMLSourceElement : HTMLElement {
514
+ interface HTMLAudioElement : HTMLMediaElement {};
515
+
516
+ interface HTMLSourceElement : HTMLElement {
629
517
  attribute DOMString src;
630
518
  attribute DOMString type;
631
519
  attribute DOMString media;
632
- };interface HTMLMediaElement : HTMLElement {
520
+ };
521
+
522
+ interface HTMLTrackElement : HTMLElement {
523
+ attribute DOMString kind;
524
+ attribute DOMString label;
525
+ attribute DOMString src;
526
+ attribute DOMString srclang;
527
+
528
+ readonly attribute TimedTrack track;
529
+ };
530
+
531
+ interface HTMLMediaElement : HTMLElement {
633
532
 
634
533
  // error state
635
534
  readonly attribute MediaError error;
@@ -642,7 +541,7 @@ interface HTMLAudioElement : HTMLMediaElement {};interface HTMLSourceElement : H
642
541
  const unsigned short NETWORK_LOADING = 2;
643
542
  const unsigned short NETWORK_NO_SOURCE = 3;
644
543
  readonly attribute unsigned short networkState;
645
- attribute boolean autobuffer;
544
+ attribute DOMString preload;
646
545
  readonly attribute TimeRanges buffered;
647
546
  void load();
648
547
  DOMString canPlayType(in DOMString type);
@@ -671,37 +570,100 @@ interface HTMLAudioElement : HTMLMediaElement {};interface HTMLSourceElement : H
671
570
  void play();
672
571
  void pause();
673
572
 
674
-
675
-
676
573
  // controls
677
574
  attribute boolean controls;
678
575
  attribute float volume;
679
576
  attribute boolean muted;
680
- };interface MediaError {
577
+
578
+ // timed tracks
579
+ readonly attribute TimedTrack[] tracks;
580
+ MutableTimedTrack addTrack(in DOMString label, in DOMString kind, in DOMString language);
581
+
582
+ };
583
+
584
+ interface MediaError {
681
585
  const unsigned short MEDIA_ERR_ABORTED = 1;
682
586
  const unsigned short MEDIA_ERR_NETWORK = 2;
683
587
  const unsigned short MEDIA_ERR_DECODE = 3;
684
588
  const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
685
589
  readonly attribute unsigned short code;
686
- };interface TimeRanges {
590
+ };
591
+
592
+ interface TimedTrack {
593
+ readonly attribute DOMString kind;
594
+ readonly attribute DOMString label;
595
+ readonly attribute DOMString language;
596
+
597
+ const unsigned short NONE = 0;
598
+ const unsigned short LOADING = 1;
599
+ const unsigned short LOADED = 2;
600
+ const unsigned short ERROR = 3;
601
+ readonly attribute unsigned short readyState;
602
+ readonly attribute Function onload;
603
+ readonly attribute Function onerror;
604
+
605
+ const unsigned short OFF = 0;
606
+ const unsigned short HIDDEN = 1;
607
+ const unsigned short SHOWING = 2;
608
+ attribute unsigned short mode;
609
+
610
+ readonly attribute TimedTrackCueList cues;
611
+ readonly attribute TimedTrackCueList activeCues;
612
+
613
+ readonly attribute Function oncuechange;
614
+ };
615
+
616
+ interface MutableTimedTrack : TimedTrack {
617
+ void addCue(in TimedTrackCue cue);
618
+ void removeCue(in TimedTrackCue cue);
619
+ };
620
+
621
+ interface TimedTrackCueList {
622
+ readonly attribute unsigned long length;
623
+ getter TimedTrackCue (in unsigned long index);
624
+ TimedTrackCue getCueById(in DOMString id);
625
+ };
626
+
627
+ [Constructor(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
628
+ interface TimedTrackCue {
629
+ readonly attribute TimedTrack track;
630
+ readonly attribute DOMString id;
631
+
632
+ readonly attribute float startTime;
633
+ readonly attribute float endTime;
634
+ readonly attribute boolean pauseOnExit;
635
+
636
+ readonly attribute DOMString direction;
637
+ readonly attribute boolean snapToLines;
638
+ readonly attribute long linePosition;
639
+ readonly attribute long textPosition;
640
+ readonly attribute long size;
641
+ readonly attribute DOMString alignment;
642
+
643
+ readonly attribute DOMString voice;
644
+ DOMString getCueAsSource();
645
+ DocumentFragment getCueAsHTML();
646
+
647
+ readonly attribute Function onenter;
648
+ readonly attribute Function onexit;
649
+ };
650
+
651
+ interface TimeRanges {
687
652
  readonly attribute unsigned long length;
688
653
  float start(in unsigned long index);
689
654
  float end(in unsigned long index);
690
- };interface HTMLOptionsCollection : HTMLCollection {
691
- // inherits item()
692
- attribute unsigned long length; // overrides inherited length
693
- caller getter object namedItem(in DOMString name); // overrides inherited namedItem()
694
- void add(in HTMLElement element, in optional HTMLElement before);
695
- void add(in HTMLElement element, in long before);
696
- void remove(in long index);
697
- };interface HTMLCanvasElement : HTMLElement {
655
+ };
656
+
657
+ interface HTMLCanvasElement : HTMLElement {
698
658
  attribute unsigned long width;
699
659
  attribute unsigned long height;
700
660
 
701
661
  DOMString toDataURL(in optional DOMString type, in any... args);
702
662
 
703
- Object getContext(in DOMString contextId);
704
- };interface CanvasRenderingContext2D {
663
+ object getContext(in DOMString contextId);
664
+ };
665
+
666
+ interface CanvasRenderingContext2D {
705
667
 
706
668
  // back-reference to the canvas
707
669
  readonly attribute HTMLCanvasElement canvas;
@@ -762,6 +724,9 @@ interface HTMLAudioElement : HTMLMediaElement {};interface HTMLSourceElement : H
762
724
  void clip();
763
725
  boolean isPointInPath(in float x, in float y);
764
726
 
727
+ // focus management
728
+ boolean drawFocusRing(in Element element, in float xCaret, in float yCaret, in optional boolean canDrawCustom);
729
+
765
730
  // text
766
731
  attribute DOMString font; // (default 10px sans-serif)
767
732
  attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
@@ -808,17 +773,23 @@ interface CanvasPixelArray {
808
773
  readonly attribute unsigned long length;
809
774
  getter octet (in unsigned long index);
810
775
  setter void (in unsigned long index, in octet value);
811
- };interface HTMLMapElement : HTMLElement {
776
+ };
777
+
778
+ interface HTMLMapElement : HTMLElement {
812
779
  attribute DOMString name;
813
780
  readonly attribute HTMLCollection areas;
814
781
  readonly attribute HTMLCollection images;
815
- };interface HTMLAreaElement : HTMLElement {
782
+ };
783
+
784
+ interface HTMLAreaElement : HTMLElement {
816
785
  attribute DOMString alt;
817
786
  attribute DOMString coords;
818
787
  attribute DOMString shape;
819
788
  stringifier attribute DOMString href;
820
789
  attribute DOMString target;
790
+
821
791
  attribute DOMString ping;
792
+
822
793
  attribute DOMString rel;
823
794
  readonly attribute DOMTokenList relList;
824
795
  attribute DOMString media;
@@ -833,7 +804,9 @@ interface CanvasPixelArray {
833
804
  attribute DOMString pathname;
834
805
  attribute DOMString search;
835
806
  attribute DOMString hash;
836
- };interface HTMLTableElement : HTMLElement {
807
+ };
808
+
809
+ interface HTMLTableElement : HTMLElement {
837
810
  attribute HTMLTableCaptionElement caption;
838
811
  HTMLElement createCaption();
839
812
  void deleteCaption();
@@ -849,40 +822,46 @@ interface CanvasPixelArray {
849
822
  HTMLElement insertRow(in optional long index);
850
823
  void deleteRow(in long index);
851
824
  attribute DOMString summary;
852
- };interface HTMLTableCaptionElement : HTMLElement {};interface HTMLTableColElement : HTMLElement {
825
+ };
826
+
827
+ interface HTMLTableCaptionElement : HTMLElement {};
828
+
829
+ interface HTMLTableColElement : HTMLElement {
853
830
  attribute unsigned long span;
854
- };interface HTMLTableSectionElement : HTMLElement {
831
+ };
832
+
833
+ interface HTMLTableSectionElement : HTMLElement {
855
834
  readonly attribute HTMLCollection rows;
856
835
  HTMLElement insertRow(in optional long index);
857
836
  void deleteRow(in long index);
858
- };interface HTMLTableRowElement : HTMLElement {
837
+ };
838
+
839
+ interface HTMLTableRowElement : HTMLElement {
859
840
  readonly attribute long rowIndex;
860
841
  readonly attribute long sectionRowIndex;
861
842
  readonly attribute HTMLCollection cells;
862
843
  HTMLElement insertCell(in optional long index);
863
844
  void deleteCell(in long index);
864
- };interface HTMLTableDataCellElement : HTMLTableCellElement {};interface HTMLPropertiesCollection : HTMLCollection {
865
- // inherits length and item()
866
- caller getter PropertyNodeList namedItem(in DOMString name); // overrides inherited namedItem()
867
- readonly attribute DOMStringList names;
868
845
  };
869
846
 
870
- typedef sequence<any> PropertyValueArray;
847
+ interface HTMLTableDataCellElement : HTMLTableCellElement {};
871
848
 
872
- interface PropertyNodeList : NodeList {
873
- readonly attribute PropertyValueArray values;
874
- };interface HTMLTableHeaderCellElement : HTMLTableCellElement {
849
+ interface HTMLTableHeaderCellElement : HTMLTableCellElement {
875
850
  attribute DOMString scope;
876
- };interface HTMLTableCellElement : HTMLElement {
851
+ };
852
+
853
+ interface HTMLTableCellElement : HTMLElement {
877
854
  attribute unsigned long colSpan;
878
855
  attribute unsigned long rowSpan;
879
- attribute DOMString headers;
856
+ [PutForwards=value] readonly attribute DOMSettableTokenList headers;
880
857
  readonly attribute long cellIndex;
881
- };[OverrideBuiltins]
858
+ };
859
+
860
+ [OverrideBuiltins]
882
861
  interface HTMLFormElement : HTMLElement {
883
862
  attribute DOMString acceptCharset;
884
863
  attribute DOMString action;
885
- attribute boolean autocomplete;
864
+ attribute DOMString autocomplete;
886
865
  attribute DOMString enctype;
887
866
  attribute DOMString method;
888
867
  attribute DOMString name;
@@ -900,7 +879,9 @@ interface HTMLFormElement : HTMLElement {
900
879
 
901
880
  void dispatchFormInput();
902
881
  void dispatchFormChange();
903
- };interface HTMLFieldSetElement : HTMLElement {
882
+ };
883
+
884
+ interface HTMLFieldSetElement : HTMLElement {
904
885
  attribute boolean disabled;
905
886
  readonly attribute HTMLFormElement form;
906
887
  attribute DOMString name;
@@ -914,16 +895,22 @@ interface HTMLFormElement : HTMLElement {
914
895
  readonly attribute DOMString validationMessage;
915
896
  boolean checkValidity();
916
897
  void setCustomValidity(in DOMString error);
917
- };interface HTMLLegendElement : HTMLElement {
898
+ };
899
+
900
+ interface HTMLLegendElement : HTMLElement {
918
901
  readonly attribute HTMLFormElement form;
919
- };interface HTMLLabelElement : HTMLElement {
902
+ };
903
+
904
+ interface HTMLLabelElement : HTMLElement {
920
905
  readonly attribute HTMLFormElement form;
921
906
  attribute DOMString htmlFor;
922
907
  readonly attribute HTMLElement control;
923
- };interface HTMLInputElement : HTMLElement {
908
+ };
909
+
910
+ interface HTMLInputElement : HTMLElement {
924
911
  attribute DOMString accept;
925
912
  attribute DOMString alt;
926
- attribute boolean autocomplete;
913
+ attribute DOMString autocomplete;
927
914
  attribute boolean autofocus;
928
915
  attribute boolean defaultChecked;
929
916
  attribute boolean checked;
@@ -954,7 +941,7 @@ interface HTMLFormElement : HTMLElement {
954
941
  attribute DOMString defaultValue;
955
942
  attribute DOMString value;
956
943
  attribute Date valueAsDate;
957
- attribute float valueAsNumber;
944
+ attribute double valueAsNumber;
958
945
  readonly attribute HTMLOptionElement selectedOption;
959
946
  attribute DOMString width;
960
947
 
@@ -973,7 +960,9 @@ interface HTMLFormElement : HTMLElement {
973
960
  attribute unsigned long selectionStart;
974
961
  attribute unsigned long selectionEnd;
975
962
  void setSelectionRange(in unsigned long start, in unsigned long end);
976
- };interface HTMLButtonElement : HTMLElement {
963
+ };
964
+
965
+ interface HTMLButtonElement : HTMLElement {
977
966
  attribute boolean autofocus;
978
967
  attribute boolean disabled;
979
968
  readonly attribute HTMLFormElement form;
@@ -993,7 +982,9 @@ interface HTMLFormElement : HTMLElement {
993
982
  void setCustomValidity(in DOMString error);
994
983
 
995
984
  readonly attribute NodeList labels;
996
- };interface HTMLSelectElement : HTMLElement {
985
+ };
986
+
987
+ interface HTMLSelectElement : HTMLElement {
997
988
  attribute boolean autofocus;
998
989
  attribute boolean disabled;
999
990
  readonly attribute HTMLFormElement form;
@@ -1022,20 +1013,18 @@ interface HTMLFormElement : HTMLElement {
1022
1013
  void setCustomValidity(in DOMString error);
1023
1014
 
1024
1015
  readonly attribute NodeList labels;
1025
- };interface HTMLDataListElement : HTMLElement {
1016
+ };
1017
+
1018
+ interface HTMLDataListElement : HTMLElement {
1026
1019
  readonly attribute HTMLCollection options;
1027
- };interface DOMTokenList {
1028
- readonly attribute unsigned long length;
1029
- getter DOMString item(in unsigned long index);
1030
- boolean contains(in DOMString token);
1031
- void add(in DOMString token);
1032
- void remove(in DOMString token);
1033
- boolean toggle(in DOMString token);
1034
- stringifier DOMString ();
1035
- };interface HTMLOptGroupElement : HTMLElement {
1020
+ };
1021
+
1022
+ interface HTMLOptGroupElement : HTMLElement {
1036
1023
  attribute boolean disabled;
1037
1024
  attribute DOMString label;
1038
- };[NamedConstructor=Option(),
1025
+ };
1026
+
1027
+ [NamedConstructor=Option(),
1039
1028
  NamedConstructor=Option(in DOMString text),
1040
1029
  NamedConstructor=Option(in DOMString text, in DOMString value),
1041
1030
  NamedConstructor=Option(in DOMString text, in DOMString value, in boolean defaultSelected),
@@ -1050,7 +1039,9 @@ interface HTMLOptionElement : HTMLElement {
1050
1039
 
1051
1040
  attribute DOMString text;
1052
1041
  readonly attribute long index;
1053
- };interface HTMLTextAreaElement : HTMLElement {
1042
+ };
1043
+
1044
+ interface HTMLTextAreaElement : HTMLElement {
1054
1045
  attribute boolean autofocus;
1055
1046
  attribute unsigned long cols;
1056
1047
  attribute boolean disabled;
@@ -1080,7 +1071,9 @@ interface HTMLOptionElement : HTMLElement {
1080
1071
  attribute unsigned long selectionStart;
1081
1072
  attribute unsigned long selectionEnd;
1082
1073
  void setSelectionRange(in unsigned long start, in unsigned long end);
1083
- };interface HTMLKeygenElement : HTMLElement {
1074
+ };
1075
+
1076
+ interface HTMLKeygenElement : HTMLElement {
1084
1077
  attribute boolean autofocus;
1085
1078
  attribute DOMString challenge;
1086
1079
  attribute boolean disabled;
@@ -1097,8 +1090,10 @@ interface HTMLOptionElement : HTMLElement {
1097
1090
  void setCustomValidity(in DOMString error);
1098
1091
 
1099
1092
  readonly attribute NodeList labels;
1100
- };interface HTMLOutputElement : HTMLElement {
1101
- attribute DOMString htmlFor;
1093
+ };
1094
+
1095
+ interface HTMLOutputElement : HTMLElement {
1096
+ [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor;
1102
1097
  readonly attribute HTMLFormElement form;
1103
1098
  attribute DOMString name;
1104
1099
 
@@ -1111,7 +1106,30 @@ interface HTMLOptionElement : HTMLElement {
1111
1106
  readonly attribute DOMString validationMessage;
1112
1107
  boolean checkValidity();
1113
1108
  void setCustomValidity(in DOMString error);
1114
- };interface ValidityState {
1109
+
1110
+ readonly attribute NodeList labels;
1111
+ };
1112
+
1113
+ interface HTMLProgressElement : HTMLElement {
1114
+ attribute float value;
1115
+ attribute float max;
1116
+ readonly attribute float position;
1117
+ readonly attribute HTMLFormElement form;
1118
+ readonly attribute NodeList labels;
1119
+ };
1120
+
1121
+ interface HTMLMeterElement : HTMLElement {
1122
+ attribute float value;
1123
+ attribute float min;
1124
+ attribute float max;
1125
+ attribute float low;
1126
+ attribute float high;
1127
+ attribute float optimum;
1128
+ readonly attribute HTMLFormElement form;
1129
+ readonly attribute NodeList labels;
1130
+ };
1131
+
1132
+ interface ValidityState {
1115
1133
  readonly attribute boolean valueMissing;
1116
1134
  readonly attribute boolean typeMismatch;
1117
1135
  readonly attribute boolean patternMismatch;
@@ -1121,23 +1139,77 @@ interface HTMLOptionElement : HTMLElement {
1121
1139
  readonly attribute boolean stepMismatch;
1122
1140
  readonly attribute boolean customError;
1123
1141
  readonly attribute boolean valid;
1124
- };interface HTMLDetailsElement : HTMLElement {
1142
+ };
1143
+
1144
+ interface HTMLDetailsElement : HTMLElement {
1125
1145
  attribute boolean open;
1126
- };interface HTMLCommandElement : HTMLElement {
1146
+ };
1147
+
1148
+ interface HTMLCommandElement : HTMLElement {
1127
1149
  attribute DOMString type;
1128
1150
  attribute DOMString label;
1129
1151
  attribute DOMString icon;
1130
1152
  attribute boolean disabled;
1131
1153
  attribute boolean checked;
1132
1154
  attribute DOMString radiogroup;
1133
- };interface HTMLMenuElement : HTMLElement {
1155
+ };
1156
+
1157
+ interface HTMLMenuElement : HTMLElement {
1134
1158
  attribute DOMString type;
1135
1159
  attribute DOMString label;
1136
- };[OverrideBuiltins]
1160
+ };
1161
+
1162
+ interface HTMLDeviceElement : HTMLElement {
1163
+ attribute DOMString type;
1164
+ readonly attribute any data;
1165
+ };
1166
+
1167
+ interface Stream {
1168
+ readonly attribute DOMString url;
1169
+ StreamRecorder record();
1170
+ };
1171
+
1172
+ interface StreamRecorder {
1173
+ File stop();
1174
+ };
1175
+
1176
+ [Constructor(in DOMString serverConfiguration)]
1177
+ interface ConnectionPeer {
1178
+ void sendText(in DOMString text);
1179
+ attribute Function ontext; // receiving
1180
+
1181
+ void sendBitmap(in HTMLImageElement image);
1182
+ attribute Function onbitmap; // receiving
1183
+
1184
+ void sendFile(in File file);
1185
+ attribute Function onfile; // receiving
1186
+
1187
+ void addStream(in Stream stream);
1188
+ void removeStream(in Stream stream);
1189
+ readonly attribute Stream[] localStreams;
1190
+ readonly attribute Stream[] remoteStreams;
1191
+ attribute Function onstream; // receiving
1192
+
1193
+ void getLocalConfiguration(in ConnectionPeerConfigurationCallback callback); // maybe this should be in the constructor
1194
+ void addRemoteConfiguration(in DOMString configuration);
1195
+ void close(); // disconnects and stops listening
1196
+
1197
+ attribute Function onconnect;
1198
+ attribute Function onerror;
1199
+ attribute Function ondisconnect;
1200
+ };
1201
+
1202
+ [Callback=FunctionOnly, NoInterfaceObject]
1203
+ interface ConnectionPeerConfigurationCallback {
1204
+ void handleEvent(in ConnectionPeer server, in DOMString configuration);
1205
+ };
1206
+
1207
+ [OverrideBuiltins, ReplaceableNamedProperties]
1137
1208
  interface Window {
1138
1209
  // the current browsing context
1139
1210
  readonly attribute WindowProxy window;
1140
1211
  readonly attribute WindowProxy self;
1212
+ readonly attribute Document document;
1141
1213
  attribute DOMString name;
1142
1214
  [PutForwards=href] readonly attribute Location location;
1143
1215
  readonly attribute History history;
@@ -1150,6 +1222,7 @@ interface Window {
1150
1222
  [Replaceable] readonly attribute BarProp statusbar;
1151
1223
  [Replaceable] readonly attribute BarProp toolbar;
1152
1224
  void close();
1225
+ void stop();
1153
1226
  void focus();
1154
1227
  void blur();
1155
1228
 
@@ -1162,7 +1235,7 @@ interface Window {
1162
1235
  readonly attribute Element frameElement;
1163
1236
  WindowProxy open(in optional DOMString url, in optional DOMString target, in optional DOMString features, in optional DOMString replace);
1164
1237
  getter WindowProxy (in unsigned long index);
1165
- getter WindowProxy (in DOMString name);
1238
+ getter any (in DOMString name);
1166
1239
 
1167
1240
  // the user agent
1168
1241
  readonly attribute Navigator navigator;
@@ -1176,8 +1249,7 @@ interface Window {
1176
1249
  any showModalDialog(in DOMString url, in optional any argument);
1177
1250
 
1178
1251
  // cross-document messaging
1179
- void postMessage(in any message, in DOMString targetOrigin);
1180
- void postMessage(in any message, in MessagePortArray ports, in DOMString targetOrigin);
1252
+ void postMessage(in any message, in DOMString targetOrigin, in optional MessagePortArray ports);
1181
1253
 
1182
1254
  // event handler IDL attributes
1183
1255
  attribute Function onabort;
@@ -1190,6 +1262,9 @@ interface Window {
1190
1262
  attribute Function onchange;
1191
1263
  attribute Function onclick;
1192
1264
  attribute Function oncontextmenu;
1265
+
1266
+ attribute Function oncuechange;
1267
+
1193
1268
  attribute Function ondblclick;
1194
1269
  attribute Function ondrag;
1195
1270
  attribute Function ondragend;
@@ -1250,51 +1325,61 @@ interface Window {
1250
1325
  attribute Function onvolumechange;
1251
1326
  attribute Function onwaiting;
1252
1327
  };
1253
- Window implements EventTarget;interface DOMSettableTokenList : DOMTokenList {
1254
- attribute DOMString value;
1255
- };interface BarProp {
1328
+ Window implements EventTarget;
1329
+
1330
+ interface BarProp {
1256
1331
  attribute boolean visible;
1257
- };[Callback=FunctionOnly, NoInterfaceObject]
1258
- interface Function {
1259
- any call(in any... arguments);
1260
- };[Supplemental, NoInterfaceObject]
1261
- interface WindowTimers {
1262
- long setTimeout(in any handler, in optional any timeout, in any... args);
1263
- void clearTimeout(in long handle);
1264
- long setInterval(in any handler, in optional any timeout, in any... args);
1265
- void clearInterval(in long handle);
1266
- };
1267
- Window implements WindowTimers;[Supplemental, NoInterfaceObject] interface WindowModal {
1268
- readonly attribute any dialogArguments;
1269
- attribute DOMString returnValue;
1270
- };
1271
- Window implements WindowModal; /* sometimes */interface Navigator {
1272
- // objects implementing this interface also implement the interfaces given below
1273
1332
  };
1274
- Navigator implements NavigatorID;
1275
- Navigator implements NavigatorOnLine;
1276
- Navigator implements NavigatorAbilities;
1277
1333
 
1278
- [Supplemental, NoInterfaceObject]
1279
- interface NavigatorID {
1280
- readonly attribute DOMString appName;
1281
- readonly attribute DOMString appVersion;
1282
- readonly attribute DOMString platform;
1283
- readonly attribute DOMString userAgent;
1334
+ interface History {
1335
+ readonly attribute long length;
1336
+ void go(in optional long delta);
1337
+ void back();
1338
+ void forward();
1339
+ void pushState(in any data, in DOMString title, in optional DOMString url);
1340
+ void replaceState(in any data, in DOMString title, in optional DOMString url);
1284
1341
  };
1285
1342
 
1286
- [Supplemental, NoInterfaceObject]
1287
- interface NavigatorOnLine {
1288
- readonly attribute boolean onLine;
1289
- };
1343
+ interface Location {
1344
+ stringifier attribute DOMString href;
1345
+ void assign(in DOMString url);
1346
+ void replace(in DOMString url);
1347
+ void reload();
1290
1348
 
1291
- [Supplemental, NoInterfaceObject]
1292
- interface NavigatorAbilities {
1293
- // content handler registration
1294
- void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title);
1295
- void registerContentHandler(in DOMString mimeType, in DOMString url, in DOMString title);
1296
- void yieldForStorageUpdates();
1297
- };interface ApplicationCache {
1349
+ // URL decomposition IDL attributes
1350
+ attribute DOMString protocol;
1351
+ attribute DOMString host;
1352
+ attribute DOMString hostname;
1353
+ attribute DOMString port;
1354
+ attribute DOMString pathname;
1355
+ attribute DOMString search;
1356
+ attribute DOMString hash;
1357
+
1358
+ // resolving relative URLs
1359
+ DOMString resolveURL(in DOMString url);
1360
+ };
1361
+
1362
+ interface PopStateEvent : Event {
1363
+ readonly attribute any state;
1364
+ void initPopStateEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
1365
+ };
1366
+
1367
+ interface HashChangeEvent : Event {
1368
+ readonly attribute any oldURL;
1369
+ readonly attribute any newURL;
1370
+ void initHashChangeEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString oldURLArg, in DOMString newURLArg);
1371
+ };
1372
+
1373
+ interface PageTransitionEvent : Event {
1374
+ readonly attribute any persisted;
1375
+ void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any persistedArg);
1376
+ };
1377
+
1378
+ interface BeforeUnloadEvent : Event {
1379
+ attribute DOMString returnValue;
1380
+ };
1381
+
1382
+ interface ApplicationCache {
1298
1383
 
1299
1384
  // update status
1300
1385
  const unsigned short UNCACHED = 0;
@@ -1319,42 +1404,56 @@ interface NavigatorAbilities {
1319
1404
  attribute Function oncached;
1320
1405
  attribute Function onobsolete;
1321
1406
  };
1322
- ApplicationCache implements EventTarget;interface History {
1323
- readonly attribute long length;
1324
- void go(in optional long delta);
1325
- void back();
1326
- void forward();
1327
- void pushState(in any data, in DOMString title, in optional DOMString url);
1328
- void replaceState(in any data, in DOMString title, in optional DOMString url);
1329
- void clearState();
1330
- };interface PopStateEvent : Event {
1331
- readonly attribute any state;
1332
- void initPopStateEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
1333
- };interface Location {
1334
- stringifier readonly attribute DOMString href;
1335
- void assign(in DOMString url);
1336
- void replace(in DOMString url);
1337
- void reload();
1407
+ ApplicationCache implements EventTarget;
1338
1408
 
1339
- // URL decomposition IDL attributes
1340
- attribute DOMString protocol;
1341
- attribute DOMString host;
1342
- attribute DOMString hostname;
1343
- attribute DOMString port;
1344
- attribute DOMString pathname;
1345
- attribute DOMString search;
1346
- attribute DOMString hash;
1409
+ [Callback=FunctionOnly, NoInterfaceObject]
1410
+ interface Function {
1411
+ any call(in any... arguments);
1412
+ };
1347
1413
 
1348
- // resolving relative URLs
1349
- DOMString resolveURL(in DOMString url);
1350
- };interface BeforeUnloadEvent : Event {
1414
+ [Supplemental, NoInterfaceObject]
1415
+ interface WindowTimers {
1416
+ long setTimeout(in any handler, in optional any timeout, in any... args);
1417
+ void clearTimeout(in long handle);
1418
+ long setInterval(in any handler, in optional any timeout, in any... args);
1419
+ void clearInterval(in long handle);
1420
+ };
1421
+ Window implements WindowTimers;
1422
+
1423
+ [Supplemental, NoInterfaceObject] interface WindowModal {
1424
+ readonly attribute any dialogArguments;
1351
1425
  attribute DOMString returnValue;
1352
- };interface DOMStringMap {
1353
- getter DOMString (in DOMString name);
1354
- setter void (in DOMString name, in DOMString value);
1355
- creator void (in DOMString name, in DOMString value);
1356
- deleter void (in DOMString name);
1357
- };interface Selection {
1426
+ };
1427
+
1428
+ interface Navigator {
1429
+ // objects implementing this interface also implement the interfaces given below
1430
+ };
1431
+ Navigator implements NavigatorID;
1432
+ Navigator implements NavigatorOnLine;
1433
+ Navigator implements NavigatorAbilities;
1434
+
1435
+ [Supplemental, NoInterfaceObject]
1436
+ interface NavigatorID {
1437
+ readonly attribute DOMString appName;
1438
+ readonly attribute DOMString appVersion;
1439
+ readonly attribute DOMString platform;
1440
+ readonly attribute DOMString userAgent;
1441
+ };
1442
+
1443
+ [Supplemental, NoInterfaceObject]
1444
+ interface NavigatorOnLine {
1445
+ readonly attribute boolean onLine;
1446
+ };
1447
+
1448
+ [Supplemental, NoInterfaceObject]
1449
+ interface NavigatorAbilities {
1450
+ // content handler registration
1451
+ void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title);
1452
+ void registerContentHandler(in DOMString mimeType, in DOMString url, in DOMString title);
1453
+ void yieldForStorageUpdates();
1454
+ };
1455
+
1456
+ interface Selection {
1358
1457
  readonly attribute Node anchorNode;
1359
1458
  readonly attribute long anchorOffset;
1360
1459
  readonly attribute Node focusNode;
@@ -1376,7 +1475,7 @@ ApplicationCache implements EventTarget;interface History {
1376
1475
  interface DragEvent : MouseEvent {
1377
1476
  readonly attribute DataTransfer dataTransfer;
1378
1477
 
1379
- void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in AbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
1478
+ void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dummyArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
1380
1479
  };
1381
1480
 
1382
1481
  interface DataTransfer {
@@ -1391,7 +1490,9 @@ interface DataTransfer {
1391
1490
 
1392
1491
  void setDragImage(in Element image, in long x, in long y);
1393
1492
  void addElement(in Element element);
1394
- };interface UndoManager {
1493
+ };
1494
+
1495
+ interface UndoManager {
1395
1496
  readonly attribute unsigned long length;
1396
1497
  getter any item(in unsigned long index);
1397
1498
  readonly attribute unsigned long position;
@@ -1399,21 +1500,29 @@ interface DataTransfer {
1399
1500
  void remove(in unsigned long index);
1400
1501
  void clearUndo();
1401
1502
  void clearRedo();
1402
- };interface UndoManagerEvent : Event {
1503
+ };
1504
+
1505
+ interface UndoManagerEvent : Event {
1403
1506
  readonly attribute any data;
1404
1507
  void initUndoManagerEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg);
1405
- };interface MessageEvent : Event {
1508
+ };
1509
+
1510
+ interface MessageEvent : Event {
1406
1511
  readonly attribute any data;
1407
1512
  readonly attribute DOMString origin;
1408
1513
  readonly attribute DOMString lastEventId;
1409
1514
  readonly attribute WindowProxy source;
1410
1515
  readonly attribute MessagePortArray ports;
1411
1516
  void initMessageEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in WindowProxy sourceArg, in MessagePortArray portsArg);
1412
- };[Constructor]
1517
+ };
1518
+
1519
+ [Constructor]
1413
1520
  interface MessageChannel {
1414
1521
  readonly attribute MessagePort port1;
1415
1522
  readonly attribute MessagePort port2;
1416
- };typedef sequence<MessagePort> MessagePortArray;
1523
+ };
1524
+
1525
+ typedef sequence<MessagePort> MessagePortArray;
1417
1526
 
1418
1527
  interface MessagePort {
1419
1528
  void postMessage(in any message, in optional MessagePortArray ports);
@@ -1437,4 +1546,315 @@ interface HTMLAppletElement : HTMLElement {
1437
1546
  attribute DOMString _object; // the underscore is not part of the identifier
1438
1547
  attribute unsigned long vspace;
1439
1548
  attribute DOMString width;
1549
+ };
1550
+
1551
+ interface HTMLMarqueeElement : HTMLElement {
1552
+ attribute DOMString behavior;
1553
+ attribute DOMString bgColor;
1554
+ attribute DOMString direction;
1555
+ attribute DOMString height;
1556
+ attribute unsigned long hspace;
1557
+ attribute long loop;
1558
+ attribute unsigned long scrollAmount;
1559
+ attribute unsigned long scrollDelay;
1560
+ attribute DOMString trueSpeed;
1561
+ attribute unsigned long vspace;
1562
+ attribute DOMString width;
1563
+
1564
+ attribute Function onbounce;
1565
+ attribute Function onfinish;
1566
+ attribute Function onstart;
1567
+
1568
+ void start();
1569
+ void stop();
1570
+ };
1571
+
1572
+ interface HTMLFrameSetElement : HTMLElement {
1573
+ attribute DOMString cols;
1574
+ attribute DOMString rows;
1575
+ attribute Function onafterprint;
1576
+ attribute Function onbeforeprint;
1577
+ attribute Function onbeforeunload;
1578
+ attribute Function onblur;
1579
+ attribute Function onerror;
1580
+ attribute Function onfocus;
1581
+ attribute Function onhashchange;
1582
+ attribute Function onload;
1583
+ attribute Function onmessage;
1584
+ attribute Function onoffline;
1585
+ attribute Function ononline;
1586
+ attribute Function onpagehide;
1587
+ attribute Function onpageshow;
1588
+ attribute Function onpopstate;
1589
+ attribute Function onredo;
1590
+ attribute Function onresize;
1591
+ attribute Function onstorage;
1592
+ attribute Function onundo;
1593
+ attribute Function onunload;
1594
+ };
1595
+
1596
+ interface HTMLFrameElement : HTMLElement {
1597
+ attribute DOMString frameBorder;
1598
+ attribute DOMString longDesc;
1599
+ attribute DOMString marginHeight;
1600
+ attribute DOMString marginWidth;
1601
+ attribute DOMString name;
1602
+ attribute boolean noResize;
1603
+ attribute DOMString scrolling;
1604
+ attribute DOMString src;
1605
+ readonly attribute Document contentDocument;
1606
+ };
1607
+
1608
+ [Supplemental]
1609
+ interface HTMLAnchorElement {
1610
+ attribute DOMString coords;
1611
+ attribute DOMString charset;
1612
+ attribute DOMString name;
1613
+ attribute DOMString rev;
1614
+ attribute DOMString shape;
1615
+ };
1616
+
1617
+ [Supplemental]
1618
+ interface HTMLAreaElement {
1619
+ attribute boolean noHref;
1620
+ };
1621
+
1622
+ interface HTMLBaseFontElement : HTMLElement {
1623
+ attribute DOMString color;
1624
+ attribute DOMString face;
1625
+ attribute long size;
1626
+ };
1627
+
1628
+ [Supplemental]
1629
+ interface HTMLBodyElement {
1630
+ attribute DOMString text;
1631
+ attribute DOMString bgColor;
1632
+ attribute DOMString background;
1633
+ attribute DOMString link;
1634
+ attribute DOMString vLink;
1635
+ attribute DOMString aLink;
1636
+ };
1637
+
1638
+ [Supplemental]
1639
+ interface HTMLBRElement {
1640
+ attribute DOMString clear;
1641
+ };
1642
+
1643
+ [Supplemental]
1644
+ interface HTMLTableCaptionElement {
1645
+ attribute DOMString align;
1646
+ };
1647
+
1648
+ [Supplemental]
1649
+ interface HTMLTableColElement {
1650
+ attribute DOMString align;
1651
+ attribute DOMString ch;
1652
+ attribute DOMString chOff;
1653
+ attribute DOMString vAlign;
1654
+ attribute DOMString width;
1655
+ };
1656
+
1657
+ interface HTMLDirectoryElement : HTMLElement {
1658
+ attribute boolean compact;
1659
+ };
1660
+
1661
+ [Supplemental]
1662
+ interface HTMLDivElement {
1663
+ attribute DOMString align;
1664
+ };
1665
+
1666
+ [Supplemental]
1667
+ interface HTMLDListElement {
1668
+ attribute boolean compact;
1669
+ };
1670
+
1671
+ [Supplemental]
1672
+ interface HTMLEmbedElement {
1673
+ attribute DOMString align;
1674
+ attribute DOMString name;
1675
+ };
1676
+
1677
+ interface HTMLFontElement : HTMLElement {
1678
+ attribute DOMString color;
1679
+ attribute DOMString face;
1680
+ attribute DOMString size;
1681
+ };
1682
+
1683
+ [Supplemental]
1684
+ interface HTMLHeadingElement {
1685
+ attribute DOMString align;
1686
+ };
1687
+
1688
+ [Supplemental]
1689
+ interface HTMLHRElement {
1690
+ attribute DOMString align;
1691
+ attribute DOMString color;
1692
+ attribute boolean noShade;
1693
+ attribute DOMString size;
1694
+ attribute DOMString width;
1695
+ };
1696
+
1697
+ [Supplemental]
1698
+ interface HTMLHtmlElement {
1699
+ attribute DOMString version;
1700
+ };
1701
+
1702
+ [Supplemental]
1703
+ interface HTMLIFrameElement {
1704
+ attribute DOMString align;
1705
+ attribute DOMString frameBorder;
1706
+ attribute DOMString longDesc;
1707
+ attribute DOMString marginHeight;
1708
+ attribute DOMString marginWidth;
1709
+ attribute DOMString scrolling;
1710
+ };
1711
+
1712
+ [Supplemental]
1713
+ interface HTMLImageElement {
1714
+ attribute DOMString name;
1715
+ attribute DOMString align;
1716
+ attribute DOMString border;
1717
+ attribute unsigned long hspace;
1718
+ attribute DOMString longDesc;
1719
+ attribute unsigned long vspace;
1720
+ };
1721
+
1722
+ [Supplemental]
1723
+ interface HTMLInputElement {
1724
+ attribute DOMString align;
1725
+ attribute DOMString useMap;
1726
+ };
1727
+
1728
+ [Supplemental]
1729
+ interface HTMLLegendElement {
1730
+ attribute DOMString align;
1731
+ };
1732
+
1733
+ [Supplemental]
1734
+ interface HTMLLIElement {
1735
+ attribute DOMString type;
1736
+ };
1737
+
1738
+ [Supplemental]
1739
+ interface HTMLLinkElement {
1740
+ attribute DOMString charset;
1741
+ attribute DOMString rev;
1742
+ attribute DOMString target;
1743
+ };
1744
+
1745
+ [Supplemental]
1746
+ interface HTMLMenuElement {
1747
+ attribute boolean compact;
1748
+ };
1749
+
1750
+ [Supplemental]
1751
+ interface HTMLMetaElement {
1752
+ attribute DOMString scheme;
1753
+ };
1754
+
1755
+ [Supplemental]
1756
+ interface HTMLObjectElement {
1757
+ attribute DOMString align;
1758
+ attribute DOMString archive;
1759
+ attribute DOMString border;
1760
+ attribute DOMString code;
1761
+ attribute DOMString codeBase;
1762
+ attribute DOMString codeType;
1763
+ attribute boolean declare;
1764
+ attribute unsigned long hspace;
1765
+ attribute DOMString standby;
1766
+ attribute unsigned long vspace;
1767
+ };
1768
+
1769
+ [Supplemental]
1770
+ interface HTMLOListElement {
1771
+ attribute boolean compact;
1772
+ attribute DOMString type;
1773
+ };
1774
+
1775
+ [Supplemental]
1776
+ interface HTMLParagraphElement {
1777
+ attribute DOMString align;
1778
+ };
1779
+
1780
+ [Supplemental]
1781
+ interface HTMLParamElement {
1782
+ attribute DOMString type;
1783
+ attribute DOMString valueType;
1784
+ };
1785
+
1786
+ [Supplemental]
1787
+ interface HTMLPreElement {
1788
+ attribute unsigned long width;
1789
+ };
1790
+
1791
+ [Supplemental]
1792
+ interface HTMLScriptElement {
1793
+ attribute DOMString event;
1794
+ attribute DOMString htmlFor;
1795
+ };
1796
+
1797
+ [Supplemental]
1798
+ interface HTMLTableElement {
1799
+ attribute DOMString align;
1800
+ attribute DOMString bgColor;
1801
+ attribute DOMString border;
1802
+ attribute DOMString cellPadding;
1803
+ attribute DOMString cellSpacing;
1804
+ attribute DOMString frame;
1805
+ attribute DOMString rules;
1806
+ attribute DOMString width;
1807
+ };
1808
+
1809
+ [Supplemental]
1810
+ interface HTMLTableSectionElement {
1811
+ attribute DOMString align;
1812
+ attribute DOMString ch;
1813
+ attribute DOMString chOff;
1814
+ attribute DOMString vAlign;
1815
+ };
1816
+
1817
+ [Supplemental]
1818
+ interface HTMLTableCellElement {
1819
+ attribute DOMString abbr;
1820
+ attribute DOMString align;
1821
+ attribute DOMString axis;
1822
+ attribute DOMString bgColor;
1823
+ attribute DOMString ch;
1824
+ attribute DOMString chOff;
1825
+ attribute DOMString height;
1826
+ attribute boolean noWrap;
1827
+ attribute DOMString vAlign;
1828
+ attribute DOMString width;
1829
+ };
1830
+
1831
+ [Supplemental]
1832
+ interface HTMLTableRowElement {
1833
+ attribute DOMString align;
1834
+ attribute DOMString bgColor;
1835
+ attribute DOMString ch;
1836
+ attribute DOMString chOff;
1837
+ attribute DOMString vAlign;
1838
+ };
1839
+
1840
+ [Supplemental]
1841
+ interface HTMLUListElement {
1842
+ attribute boolean compact;
1843
+ attribute DOMString type;
1844
+ };
1845
+
1846
+ [Supplemental]
1847
+ interface HTMLDocument {
1848
+ attribute DOMString fgColor;
1849
+ attribute DOMString bgColor;
1850
+ attribute DOMString linkColor;
1851
+ attribute DOMString vlinkColor;
1852
+ attribute DOMString alinkColor;
1853
+
1854
+ readonly attribute HTMLCollection anchors;
1855
+ readonly attribute HTMLCollection applets;
1856
+
1857
+ void clear();
1858
+
1859
+ readonly attribute HTMLAllCollection all;
1440
1860
  };