webidl 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/.autotest +9 -0
  2. data/.document +5 -0
  3. data/.gitignore +5 -0
  4. data/LICENSE +20 -0
  5. data/README.rdoc +31 -0
  6. data/Rakefile +65 -0
  7. data/VERSION +1 -0
  8. data/bin/webidl2ruby +13 -0
  9. data/examples/html5.rb +6 -0
  10. data/lib/webidl.rb +47 -0
  11. data/lib/webidl/ast/argument.rb +25 -0
  12. data/lib/webidl/ast/attribute.rb +29 -0
  13. data/lib/webidl/ast/const.rb +17 -0
  14. data/lib/webidl/ast/exception.rb +15 -0
  15. data/lib/webidl/ast/extended_attribute.rb +14 -0
  16. data/lib/webidl/ast/field.rb +14 -0
  17. data/lib/webidl/ast/implements_statement.rb +14 -0
  18. data/lib/webidl/ast/interface.rb +24 -0
  19. data/lib/webidl/ast/module.rb +17 -0
  20. data/lib/webidl/ast/node.rb +29 -0
  21. data/lib/webidl/ast/operation.rb +43 -0
  22. data/lib/webidl/ast/scoped_name.rb +28 -0
  23. data/lib/webidl/ast/type.rb +20 -0
  24. data/lib/webidl/ast/typedef.rb +15 -0
  25. data/lib/webidl/extensions/string.rb +22 -0
  26. data/lib/webidl/extensions/syntax_node.rb +5 -0
  27. data/lib/webidl/generator.rb +38 -0
  28. data/lib/webidl/generator/ruby_sexp_visitor.rb +118 -0
  29. data/lib/webidl/parse_tree/absolute_scoped_name.rb +11 -0
  30. data/lib/webidl/parse_tree/argument.rb +20 -0
  31. data/lib/webidl/parse_tree/argument_list.rb +14 -0
  32. data/lib/webidl/parse_tree/attribute.rb +17 -0
  33. data/lib/webidl/parse_tree/const.rb +9 -0
  34. data/lib/webidl/parse_tree/definitions.rb +25 -0
  35. data/lib/webidl/parse_tree/exception.rb +15 -0
  36. data/lib/webidl/parse_tree/exception_field.rb +11 -0
  37. data/lib/webidl/parse_tree/extended_attributes.rb +41 -0
  38. data/lib/webidl/parse_tree/implements_statement.rb +20 -0
  39. data/lib/webidl/parse_tree/interface.rb +21 -0
  40. data/lib/webidl/parse_tree/interface_inheritance.rb +11 -0
  41. data/lib/webidl/parse_tree/interface_members.rb +21 -0
  42. data/lib/webidl/parse_tree/module.rb +15 -0
  43. data/lib/webidl/parse_tree/nullable_type.rb +11 -0
  44. data/lib/webidl/parse_tree/operation.rb +30 -0
  45. data/lib/webidl/parse_tree/relative_scoped_name.rb +15 -0
  46. data/lib/webidl/parse_tree/scoped_name_list.rb +16 -0
  47. data/lib/webidl/parse_tree/specials.rb +17 -0
  48. data/lib/webidl/parse_tree/stringifier_attribute_or_operation.rb +16 -0
  49. data/lib/webidl/parse_tree/typedef.rb +11 -0
  50. data/lib/webidl/parser/debug_helper.rb +17 -0
  51. data/lib/webidl/parser/idl.treetop +369 -0
  52. data/spec/ast_spec.rb +218 -0
  53. data/spec/fixtures/empty_interface.idl +3 -0
  54. data/spec/fixtures/empty_module.idl +3 -0
  55. data/spec/fixtures/framework.idl +48 -0
  56. data/spec/fixtures/html5.idl +1440 -0
  57. data/spec/fixtures/interface_with_attribute.idl +7 -0
  58. data/spec/fixtures/interface_with_inheritance.idl +9 -0
  59. data/spec/fixtures/interface_with_members.idl +5 -0
  60. data/spec/fixtures/interface_with_stringifiers.idl +5 -0
  61. data/spec/fixtures/module_with_exception.idl +13 -0
  62. data/spec/fixtures/module_with_implements_statement.idl +6 -0
  63. data/spec/fixtures/module_with_typedef.idl +4 -0
  64. data/spec/fixtures/module_with_xattr_ident.idl +4 -0
  65. data/spec/fixtures/module_with_xattr_named_args.idl +5 -0
  66. data/spec/fixtures/module_with_xattr_no_arg.idl +5 -0
  67. data/spec/fixtures/module_with_xattr_scoped.idl +4 -0
  68. data/spec/fixtures/module_with_xattr_two_args.idl +4 -0
  69. data/spec/fixtures/nested.idl +4 -0
  70. data/spec/fixtures/websocket.idl +19 -0
  71. data/spec/generator_spec.rb +92 -0
  72. data/spec/parser_spec.rb +64 -0
  73. data/spec/spec_helper.rb +45 -0
  74. metadata +161 -0
data/spec/ast_spec.rb ADDED
@@ -0,0 +1,218 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe WebIDL::Ast do
4
+
5
+ #
6
+ # modules
7
+ #
8
+
9
+ it "creates a module" do
10
+ result = parse(fixture("empty_module.idl")).build
11
+
12
+ result.should be_kind_of(Array)
13
+ result.size.should == 1
14
+
15
+ result.first.should be_kind_of(WebIDL::Ast::Module)
16
+ result.first.qualified_name.should == "::gui"
17
+ end
18
+
19
+ it "creates a module with a typedef" do
20
+ mod = parse(fixture("module_with_typedef.idl")).build.first
21
+
22
+ mod.definitions.should be_kind_of(Array)
23
+
24
+ typedef = mod.definitions.first
25
+ typedef.should be_kind_of(WebIDL::Ast::TypeDef)
26
+
27
+ typedef.type.should == 'DOMString'
28
+ typedef.name.should == 'string'
29
+ typedef.qualified_name.should == '::gui::string'
30
+ end
31
+
32
+ it "creates a module with an extended attribute (no args)" do
33
+ mod = parse(fixture("module_with_xattr_no_arg.idl")).build.first
34
+ mod.should be_kind_of(WebIDL::Ast::Module)
35
+
36
+ xattrs = mod.extended_attributes
37
+ xattrs.size.should == 1
38
+
39
+ xattrs.first.should be_kind_of(WebIDL::Ast::ExtendedAttribute)
40
+ xattrs.first.name.should == 'OverrideBuiltins'
41
+ end
42
+
43
+ it "creates a module with extended attribute (two args)" do
44
+ mod = parse(fixture("module_with_xattr_two_args.idl")).build.first
45
+ mod.should be_kind_of(WebIDL::Ast::Module)
46
+
47
+ xattrs = mod.extended_attributes
48
+ xattrs.size.should == 1
49
+
50
+ xattr = xattrs.first
51
+
52
+ xattr.should be_kind_of(WebIDL::Ast::ExtendedAttribute)
53
+ xattr.name.should == 'Constructor'
54
+
55
+ xattr.args.size.should == 2
56
+ xattr.args.should be_kind_of(Array)
57
+ xattr.args.each { |a| a.should be_kind_of(WebIDL::Ast::Argument) }
58
+ end
59
+
60
+ it "creates a module with extended attribute (named args)" do
61
+ mod = parse(fixture("module_with_xattr_named_args.idl")).build.first
62
+ mod.should be_kind_of(WebIDL::Ast::Module)
63
+
64
+ xattrs = mod.extended_attributes
65
+ xattrs.should be_kind_of(Array)
66
+
67
+ xattr = xattrs.first
68
+ xattr.should be_kind_of(Array) # TODO: review this
69
+
70
+ xattr.first.should == 'NamedConstructor'
71
+ xattr.last.should be_kind_of(WebIDL::Ast::ExtendedAttribute)
72
+ end
73
+
74
+ it "creates a module with extended attribute (ident)" do
75
+ mod = parse(fixture("module_with_xattr_ident.idl")).build.first
76
+ mod.should be_kind_of(WebIDL::Ast::Module)
77
+
78
+ xattrs = mod.extended_attributes
79
+ xattrs.should be_kind_of(Array)
80
+
81
+ xattr = xattrs.first
82
+ xattr.should be_kind_of(Array) # TODO: review this
83
+
84
+ xattr.first.should == 'PutForwards'
85
+ xattr.last.should == "name"
86
+ end
87
+
88
+ it "creates a module with extended attribute (scoped name)" do
89
+ mod = parse(fixture("module_with_xattr_scoped.idl")).build.first
90
+ mod.should be_kind_of(WebIDL::Ast::Module)
91
+
92
+ xattrs = mod.extended_attributes
93
+ xattrs.should be_kind_of(Array)
94
+
95
+ xattr = xattrs.first
96
+ xattr.should be_kind_of(Array) # TODO: review this
97
+
98
+ xattr.first.should == 'Prefix'
99
+ xattr.last.should be_kind_of(WebIDL::Ast::ScopedName)
100
+ end
101
+
102
+ #
103
+ # interfaces
104
+ #
105
+
106
+ it "creates an empty interface" do
107
+ result = parse(fixture("empty_interface.idl")).build
108
+
109
+ result.should be_kind_of(Array)
110
+ result.size.should == 1
111
+
112
+ interface = result.first
113
+ interface.should be_kind_of(WebIDL::Ast::Interface)
114
+ interface.name.should == "System"
115
+ end
116
+
117
+ it "creates an interface with members" do
118
+ interface = parse(fixture("interface_with_members.idl")).build.first
119
+ interface.should be_kind_of(WebIDL::Ast::Interface)
120
+
121
+ interface.members.first.should be_kind_of(WebIDL::Ast::Operation)
122
+ end
123
+
124
+ it "creates an interface with stringifier members" do
125
+ interface = parse(fixture("interface_with_stringifiers.idl")).build.first
126
+ interface.should be_kind_of(WebIDL::Ast::Interface)
127
+
128
+ interface.members.first.should be_kind_of(WebIDL::Ast::Attribute)
129
+ interface.members.first.should be_stringifier
130
+
131
+ interface.members.last.should be_kind_of(WebIDL::Ast::Operation)
132
+ interface.members.last.should be_stringifier
133
+ end
134
+
135
+ it "creates an interface with inheritance" do
136
+ interface = parse(fixture("interface_with_inheritance.idl")).build.last
137
+ interface.inherits.should_not be_empty
138
+ interface.inherits.first.qualified_name.should == "::foo"
139
+ end
140
+
141
+ it "creates a framework from the example in the WebIDL spec" do
142
+ mod = parse(fixture("framework.idl")).build.first
143
+ mod.definitions.size.should == 4
144
+ mod.definitions.map { |e| e.class}.should == [
145
+ WebIDL::Ast::TypeDef,
146
+ WebIDL::Ast::Exception,
147
+ WebIDL::Ast::Interface,
148
+ WebIDL::Ast::Module
149
+ ]
150
+
151
+ inner_mod = mod.definitions[3]
152
+ inner_mod.name.should == 'gui'
153
+ inner_mod.qualified_name.should == '::framework::gui'
154
+
155
+ interface = inner_mod.definitions[0]
156
+ interface.name.should == 'TextField'
157
+ interface.qualified_name.should == '::framework::gui::TextField'
158
+ interface.members.first.qualified_name.should == '::framework::gui::TextField::const' # or should it?
159
+ end
160
+
161
+
162
+ #
163
+ # various
164
+ #
165
+
166
+ it "creates an exception" do
167
+ interface = parse(fixture("module_with_exception.idl")).build.first
168
+ ex = interface.definitions.first
169
+
170
+ ex.name.should == "FrameworkException"
171
+ ex.qualified_name.should == '::framework::FrameworkException'
172
+ ex.members.size.should == 2
173
+
174
+ first, last = ex.members
175
+
176
+ first.should be_kind_of(WebIDL::Ast::Const)
177
+ first.name.should == "ERR_NOT_FOUND"
178
+ first.qualified_name.should == '::framework::FrameworkException::ERR_NOT_FOUND'
179
+ first.type.should be_kind_of(WebIDL::Ast::Type)
180
+ first.type.name.should == :long
181
+ first.value.should == 1
182
+
183
+ last.should be_kind_of(WebIDL::Ast::Field)
184
+ last.type.should be_kind_of(WebIDL::Ast::Type)
185
+ last.type.name.should == :long
186
+ last.name.should == "code"
187
+ end
188
+
189
+
190
+ it "creates an attribute" do
191
+ interface = parse(fixture("interface_with_attribute.idl")).build.first
192
+ first, last = interface.members
193
+
194
+ first.should be_kind_of(WebIDL::Ast::Attribute)
195
+ first.name.should == 'const'
196
+
197
+ last.should be_kind_of(WebIDL::Ast::Attribute)
198
+ last.name.should == 'value'
199
+ last.type.name.should == :DOMString
200
+ last.type.should be_nullable
201
+ end
202
+
203
+ it "creates an implements statement" do
204
+ mod = parse(fixture("module_with_implements_statement.idl")).build.first
205
+
206
+ mod.definitions.first.should be_kind_of(WebIDL::Ast::Interface)
207
+
208
+ impls = mod.definitions.last
209
+ impls.should be_kind_of(WebIDL::Ast::ImplementsStatement)
210
+ impls.implementor.should == "::foo::bar"
211
+ impls.implementee.should == "::foo::baz"
212
+ end
213
+
214
+ it "builds an AST from the HTML5 spec" do
215
+ parse(fixture("html5.idl")).build
216
+ end
217
+
218
+ end
@@ -0,0 +1,3 @@
1
+ interface System {
2
+
3
+ };
@@ -0,0 +1,3 @@
1
+ module gui {
2
+
3
+ };
@@ -0,0 +1,48 @@
1
+ // Module identifier: "framework"
2
+ // Qualified name: "::framework"
3
+ module framework {
4
+
5
+ // Typedef identifier: "number"
6
+ // Qualified name: "::framework::number"
7
+ typedef float number;
8
+
9
+ // Exception identifier: "FrameworkException"
10
+ // Qualified name: "::framework::FrameworkException"
11
+ exception FrameworkException {
12
+
13
+ // Constant identifier: "ERR_NOT_FOUND"
14
+ // Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND"
15
+ const long ERR_NOT_FOUND = 1;
16
+
17
+ // Exception field identifier: "code"
18
+ long code;
19
+ };
20
+
21
+ // Interface identifier: "System"
22
+ // Qualified name: "::framework::System"
23
+ interface System {
24
+
25
+ // Operation identifier: "createObject"
26
+ // Operation argument identifier: "interface"
27
+ object createObject(in DOMString _interface);
28
+
29
+ // Operation has no identifier; it declares a getter.
30
+ getter DOMString (in DOMString keyName);
31
+ };
32
+
33
+ // Module identifier: "gui"
34
+ // Qualified name: "::framework::gui"
35
+ module gui {
36
+
37
+ // Interface identifier: "TextField"
38
+ // Qualified name: "::framework::gui::TextField"
39
+ interface TextField {
40
+
41
+ // Attribute identifier: "const"
42
+ attribute boolean _const;
43
+
44
+ // Attribute identifier: "value"
45
+ attribute DOMString? _value;
46
+ };
47
+ };
48
+ };
@@ -0,0 +1,1440 @@
1
+ [OverrideBuiltins]
2
+ interface HTMLDocument {
3
+ // resource metadata management
4
+ [PutForwards=href] readonly attribute Location location;
5
+ readonly attribute DOMString URL;
6
+ attribute DOMString domain;
7
+ readonly attribute DOMString referrer;
8
+ attribute DOMString cookie;
9
+ readonly attribute DOMString lastModified;
10
+ readonly attribute DOMString compatMode;
11
+ attribute DOMString charset;
12
+ readonly attribute DOMString characterSet;
13
+ readonly attribute DOMString defaultCharset;
14
+ readonly attribute DOMString readyState;
15
+
16
+ // DOM tree accessors
17
+ attribute DOMString title;
18
+ attribute DOMString dir;
19
+ attribute HTMLElement body;
20
+ readonly attribute HTMLHeadElement head;
21
+ readonly attribute HTMLCollection images;
22
+ readonly attribute HTMLCollection embeds;
23
+ readonly attribute HTMLCollection plugins;
24
+ readonly attribute HTMLCollection links;
25
+ readonly attribute HTMLCollection forms;
26
+ readonly attribute HTMLCollection scripts;
27
+ NodeList getElementsByName(in DOMString elementName);
28
+ NodeList getElementsByClassName(in DOMString classNames);
29
+ NodeList getItems(in optional DOMString typeNames);
30
+ getter any (in DOMString name);
31
+
32
+ // dynamic markup insertion
33
+ attribute DOMString innerHTML;
34
+ HTMLDocument open(in optional DOMString type, in optional DOMString replace);
35
+ WindowProxy open(in DOMString url, in DOMString name, in DOMString features, in optional boolean replace);
36
+ void close();
37
+ void write(in DOMString... text);
38
+ void writeln(in DOMString... text);
39
+
40
+ // user interaction
41
+ Selection getSelection();
42
+ readonly attribute Element activeElement;
43
+ boolean hasFocus();
44
+ attribute DOMString designMode;
45
+ boolean execCommand(in DOMString commandId);
46
+ boolean execCommand(in DOMString commandId, in boolean showUI);
47
+ boolean execCommand(in DOMString commandId, in boolean showUI, in DOMString value);
48
+ boolean queryCommandEnabled(in DOMString commandId);
49
+ boolean queryCommandIndeterm(in DOMString commandId);
50
+ boolean queryCommandState(in DOMString commandId);
51
+ boolean queryCommandSupported(in DOMString commandId);
52
+ DOMString queryCommandValue(in DOMString commandId);
53
+ readonly attribute HTMLCollection commands;
54
+
55
+ // event handler IDL attributes
56
+ attribute Function onabort;
57
+ attribute Function onblur;
58
+ attribute Function oncanplay;
59
+ attribute Function oncanplaythrough;
60
+ attribute Function onchange;
61
+ attribute Function onclick;
62
+ attribute Function oncontextmenu;
63
+ attribute Function ondblclick;
64
+ attribute Function ondrag;
65
+ attribute Function ondragend;
66
+ attribute Function ondragenter;
67
+ attribute Function ondragleave;
68
+ attribute Function ondragover;
69
+ attribute Function ondragstart;
70
+ attribute Function ondrop;
71
+ attribute Function ondurationchange;
72
+ attribute Function onemptied;
73
+ attribute Function onended;
74
+ attribute Function onerror;
75
+ attribute Function onfocus;
76
+ attribute Function onformchange;
77
+ attribute Function onforminput;
78
+ attribute Function oninput;
79
+ attribute Function oninvalid;
80
+ attribute Function onkeydown;
81
+ attribute Function onkeypress;
82
+ attribute Function onkeyup;
83
+ attribute Function onload;
84
+ attribute Function onloadeddata;
85
+ attribute Function onloadedmetadata;
86
+ attribute Function onloadstart;
87
+ attribute Function onmousedown;
88
+ attribute Function onmousemove;
89
+ attribute Function onmouseout;
90
+ attribute Function onmouseover;
91
+ attribute Function onmouseup;
92
+ attribute Function onmousewheel;
93
+ attribute Function onpause;
94
+ attribute Function onplay;
95
+ attribute Function onplaying;
96
+ attribute Function onprogress;
97
+ attribute Function onratechange;
98
+ attribute Function onreadystatechange;
99
+ attribute Function onscroll;
100
+ attribute Function onseeked;
101
+ attribute Function onseeking;
102
+ attribute Function onselect;
103
+ attribute Function onshow;
104
+ attribute Function onstalled;
105
+ attribute Function onsubmit;
106
+ attribute Function onsuspend;
107
+ attribute Function ontimeupdate;
108
+ attribute Function onvolumechange;
109
+ attribute Function onwaiting;
110
+ };
111
+ Document implements HTMLDocument;
112
+
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]
200
+ interface DOMHTMLImplementation {
201
+ Document createHTMLDocument(in DOMString title);
202
+ };
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;
242
+ };
243
+
244
+ interface HTMLElement : Element {
245
+ // DOM tree accessors
246
+ NodeList getElementsByClassName(in DOMString classNames);
247
+
248
+ // dynamic markup insertion
249
+ attribute DOMString innerHTML;
250
+ attribute DOMString outerHTML;
251
+ void insertAdjacentHTML(in DOMString position, in DOMString text);
252
+
253
+ // metadata attributes
254
+ attribute DOMString id;
255
+ attribute DOMString title;
256
+ attribute DOMString lang;
257
+ attribute DOMString dir;
258
+ attribute DOMString className;
259
+ readonly attribute DOMTokenList classList;
260
+ readonly attribute DOMStringMap dataset;
261
+
262
+ // microdata
263
+ attribute boolean itemScope;
264
+ attribute DOMString itemType;
265
+ attribute DOMString itemId;
266
+ attribute DOMString itemRef;
267
+ [PutForwards=value] readonly attribute DOMSettableTokenList itemProp;
268
+ readonly attribute HTMLPropertiesCollection properties;
269
+ attribute any itemValue;
270
+
271
+ // user interaction
272
+ attribute boolean hidden;
273
+ void click();
274
+ void scrollIntoView();
275
+ void scrollIntoView(in boolean top);
276
+ attribute long tabIndex;
277
+ void focus();
278
+ void blur();
279
+ attribute DOMString accessKey;
280
+ readonly attribute DOMString accessKeyLabel;
281
+ attribute boolean draggable;
282
+ attribute DOMString contentEditable;
283
+ readonly attribute boolean isContentEditable;
284
+ attribute HTMLMenuElement contextMenu;
285
+ attribute DOMString spellcheck;
286
+
287
+ // command API
288
+ readonly attribute DOMString commandType;
289
+ readonly attribute DOMString label;
290
+ readonly attribute DOMString icon;
291
+ readonly attribute boolean disabled;
292
+ readonly attribute boolean checked;
293
+
294
+ // styling
295
+ readonly attribute CSSStyleDeclaration style;
296
+
297
+ // event handler IDL attributes
298
+ attribute Function onabort;
299
+ attribute Function onblur;
300
+ attribute Function oncanplay;
301
+ attribute Function oncanplaythrough;
302
+ attribute Function onchange;
303
+ attribute Function onclick;
304
+ attribute Function oncontextmenu;
305
+ attribute Function ondblclick;
306
+ attribute Function ondrag;
307
+ attribute Function ondragend;
308
+ attribute Function ondragenter;
309
+ attribute Function ondragleave;
310
+ attribute Function ondragover;
311
+ attribute Function ondragstart;
312
+ attribute Function ondrop;
313
+ attribute Function ondurationchange;
314
+ attribute Function onemptied;
315
+ attribute Function onended;
316
+ attribute Function onerror;
317
+ attribute Function onfocus;
318
+ attribute Function onformchange;
319
+ attribute Function onforminput;
320
+ attribute Function oninput;
321
+ attribute Function oninvalid;
322
+ attribute Function onkeydown;
323
+ attribute Function onkeypress;
324
+ attribute Function onkeyup;
325
+ attribute Function onload;
326
+ attribute Function onloadeddata;
327
+ attribute Function onloadedmetadata;
328
+ attribute Function onloadstart;
329
+ attribute Function onmousedown;
330
+ attribute Function onmousemove;
331
+ attribute Function onmouseout;
332
+ attribute Function onmouseover;
333
+ attribute Function onmouseup;
334
+ attribute Function onmousewheel;
335
+ attribute Function onpause;
336
+ attribute Function onplay;
337
+ attribute Function onplaying;
338
+ attribute Function onprogress;
339
+ attribute Function onratechange;
340
+ attribute Function onreadystatechange;
341
+ attribute Function onscroll;
342
+ attribute Function onseeked;
343
+ attribute Function onseeking;
344
+ attribute Function onselect;
345
+ attribute Function onshow;
346
+ attribute Function onstalled;
347
+ attribute Function onsubmit;
348
+ attribute Function onsuspend;
349
+ attribute Function ontimeupdate;
350
+ attribute Function onvolumechange;
351
+ attribute Function onwaiting;
352
+ };
353
+
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;
459
+
460
+ readonly attribute HTMLCollection anchors;
461
+ readonly attribute HTMLCollection applets;
462
+
463
+ readonly attribute HTMLAllCollection all;
464
+ };interface HTMLHeadElement : HTMLElement {};interface HTMLTitleElement : HTMLElement {
465
+ attribute DOMString text;
466
+ };interface HTMLBaseElement : HTMLElement {
467
+ attribute DOMString href;
468
+ attribute DOMString target;
469
+ };interface HTMLLinkElement : HTMLElement {
470
+ attribute boolean disabled;
471
+ attribute DOMString href;
472
+ attribute DOMString rel;
473
+ readonly attribute DOMTokenList relList;
474
+ attribute DOMString media;
475
+ attribute DOMString hreflang;
476
+ attribute DOMString type;
477
+ attribute DOMString sizes;
478
+ };
479
+ HTMLLinkElement implements LinkStyle;interface HTMLMetaElement : HTMLElement {
480
+ attribute DOMString name;
481
+ attribute DOMString httpEquiv;
482
+ attribute DOMString content;
483
+ };interface HTMLStyleElement : HTMLElement {
484
+ attribute boolean disabled;
485
+ attribute DOMString media;
486
+ attribute DOMString type;
487
+ attribute boolean scoped;
488
+ };
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 {
494
+ attribute DOMString src;
495
+ attribute boolean async;
496
+ attribute boolean defer;
497
+ attribute DOMString type;
498
+ attribute DOMString charset;
499
+ attribute DOMString text;
500
+ };interface HTMLBodyElement : HTMLElement {
501
+ attribute Function onafterprint;
502
+ attribute Function onbeforeprint;
503
+ attribute Function onbeforeunload;
504
+ attribute Function onblur;
505
+ attribute Function onerror;
506
+ attribute Function onfocus;
507
+ attribute Function onhashchange;
508
+ attribute Function onload;
509
+ attribute Function onmessage;
510
+ attribute Function onoffline;
511
+ attribute Function ononline;
512
+ attribute Function onpopstate;
513
+ attribute Function onpagehide;
514
+ attribute Function onpageshow;
515
+ attribute Function onredo;
516
+ attribute Function onresize;
517
+ attribute Function onstorage;
518
+ attribute Function onundo;
519
+ attribute Function onunload;
520
+ };interface HTMLHeadingElement : HTMLElement {};interface HTMLParagraphElement : HTMLElement {};interface HTMLHRElement : HTMLElement {};interface HTMLBRElement : HTMLElement {};interface HTMLPreElement : HTMLElement {};interface HTMLQuoteElement : HTMLElement {
521
+ attribute DOMString cite;
522
+ };interface HTMLOListElement : HTMLElement {
523
+ attribute boolean reversed;
524
+ 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 {
530
+ attribute long value;
531
+ };interface HTMLDListElement : HTMLElement {};interface HTMLDivElement : HTMLElement {};interface HTMLAnchorElement : HTMLElement {
532
+ stringifier attribute DOMString href;
533
+ attribute DOMString target;
534
+ attribute DOMString ping;
535
+ attribute DOMString rel;
536
+ readonly attribute DOMTokenList relList;
537
+ attribute DOMString media;
538
+ attribute DOMString hreflang;
539
+ attribute DOMString type;
540
+
541
+ // URL decomposition IDL attributes
542
+ attribute DOMString protocol;
543
+ attribute DOMString host;
544
+ attribute DOMString hostname;
545
+ attribute DOMString port;
546
+ attribute DOMString pathname;
547
+ attribute DOMString search;
548
+ attribute DOMString hash;
549
+ };interface HTMLTimeElement : HTMLElement {
550
+ attribute DOMString dateTime;
551
+ attribute boolean pubDate;
552
+ 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 {
565
+ attribute DOMString cite;
566
+ attribute DOMString dateTime;
567
+ };[NamedConstructor=Image(),
568
+ NamedConstructor=Image(in unsigned long width),
569
+ NamedConstructor=Image(in unsigned long width, in unsigned long height)]
570
+ interface HTMLImageElement : HTMLElement {
571
+ attribute DOMString alt;
572
+ attribute DOMString src;
573
+ attribute DOMString useMap;
574
+ attribute boolean isMap;
575
+ attribute unsigned long width;
576
+ attribute unsigned long height;
577
+ readonly attribute unsigned long naturalWidth;
578
+ readonly attribute unsigned long naturalHeight;
579
+ 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
+ };
584
+
585
+ interface RadioNodeList : NodeList {
586
+ attribute DOMString value;
587
+ };interface HTMLIFrameElement : HTMLElement {
588
+ attribute DOMString src;
589
+ attribute DOMString name;
590
+ attribute DOMString sandbox;
591
+ attribute boolean seamless;
592
+ attribute DOMString width;
593
+ attribute DOMString height;
594
+ readonly attribute Document contentDocument;
595
+ readonly attribute WindowProxy contentWindow;
596
+ };interface HTMLEmbedElement : HTMLElement {
597
+ attribute DOMString src;
598
+ attribute DOMString type;
599
+ attribute DOMString width;
600
+ attribute DOMString height;
601
+ };interface HTMLObjectElement : HTMLElement {
602
+ attribute DOMString data;
603
+ attribute DOMString type;
604
+ attribute DOMString name;
605
+ attribute DOMString useMap;
606
+ readonly attribute HTMLFormElement form;
607
+ attribute DOMString width;
608
+ attribute DOMString height;
609
+ readonly attribute Document contentDocument;
610
+ readonly attribute WindowProxy contentWindow;
611
+
612
+ readonly attribute boolean willValidate;
613
+ readonly attribute ValidityState validity;
614
+ readonly attribute DOMString validationMessage;
615
+ boolean checkValidity();
616
+ void setCustomValidity(in DOMString error);
617
+ };interface HTMLParamElement : HTMLElement {
618
+ attribute DOMString name;
619
+ attribute DOMString value;
620
+ };interface HTMLVideoElement : HTMLMediaElement {
621
+ attribute DOMString width;
622
+ attribute DOMString height;
623
+ readonly attribute unsigned long videoWidth;
624
+ readonly attribute unsigned long videoHeight;
625
+ attribute DOMString poster;
626
+ };[NamedConstructor=Audio(),
627
+ NamedConstructor=Audio(in DOMString src)]
628
+ interface HTMLAudioElement : HTMLMediaElement {};interface HTMLSourceElement : HTMLElement {
629
+ attribute DOMString src;
630
+ attribute DOMString type;
631
+ attribute DOMString media;
632
+ };interface HTMLMediaElement : HTMLElement {
633
+
634
+ // error state
635
+ readonly attribute MediaError error;
636
+
637
+ // network state
638
+ attribute DOMString src;
639
+ readonly attribute DOMString currentSrc;
640
+ const unsigned short NETWORK_EMPTY = 0;
641
+ const unsigned short NETWORK_IDLE = 1;
642
+ const unsigned short NETWORK_LOADING = 2;
643
+ const unsigned short NETWORK_NO_SOURCE = 3;
644
+ readonly attribute unsigned short networkState;
645
+ attribute boolean autobuffer;
646
+ readonly attribute TimeRanges buffered;
647
+ void load();
648
+ DOMString canPlayType(in DOMString type);
649
+
650
+ // ready state
651
+ const unsigned short HAVE_NOTHING = 0;
652
+ const unsigned short HAVE_METADATA = 1;
653
+ const unsigned short HAVE_CURRENT_DATA = 2;
654
+ const unsigned short HAVE_FUTURE_DATA = 3;
655
+ const unsigned short HAVE_ENOUGH_DATA = 4;
656
+ readonly attribute unsigned short readyState;
657
+ readonly attribute boolean seeking;
658
+
659
+ // playback state
660
+ attribute float currentTime;
661
+ readonly attribute float startTime;
662
+ readonly attribute float duration;
663
+ readonly attribute boolean paused;
664
+ attribute float defaultPlaybackRate;
665
+ attribute float playbackRate;
666
+ readonly attribute TimeRanges played;
667
+ readonly attribute TimeRanges seekable;
668
+ readonly attribute boolean ended;
669
+ attribute boolean autoplay;
670
+ attribute boolean loop;
671
+ void play();
672
+ void pause();
673
+
674
+
675
+
676
+ // controls
677
+ attribute boolean controls;
678
+ attribute float volume;
679
+ attribute boolean muted;
680
+ };interface MediaError {
681
+ const unsigned short MEDIA_ERR_ABORTED = 1;
682
+ const unsigned short MEDIA_ERR_NETWORK = 2;
683
+ const unsigned short MEDIA_ERR_DECODE = 3;
684
+ const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
685
+ readonly attribute unsigned short code;
686
+ };interface TimeRanges {
687
+ readonly attribute unsigned long length;
688
+ float start(in unsigned long index);
689
+ 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 {
698
+ attribute unsigned long width;
699
+ attribute unsigned long height;
700
+
701
+ DOMString toDataURL(in optional DOMString type, in any... args);
702
+
703
+ Object getContext(in DOMString contextId);
704
+ };interface CanvasRenderingContext2D {
705
+
706
+ // back-reference to the canvas
707
+ readonly attribute HTMLCanvasElement canvas;
708
+
709
+ // state
710
+ void save(); // push state on state stack
711
+ void restore(); // pop state stack and restore state
712
+
713
+ // transformations (default transform is the identity matrix)
714
+ void scale(in float x, in float y);
715
+ void rotate(in float angle);
716
+ void translate(in float x, in float y);
717
+ void transform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
718
+ void setTransform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
719
+
720
+ // compositing
721
+ attribute float globalAlpha; // (default 1.0)
722
+ attribute DOMString globalCompositeOperation; // (default source-over)
723
+
724
+ // colors and styles
725
+ attribute any strokeStyle; // (default black)
726
+ attribute any fillStyle; // (default black)
727
+ CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1);
728
+ CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
729
+ CanvasPattern createPattern(in HTMLImageElement image, in DOMString repetition);
730
+ CanvasPattern createPattern(in HTMLCanvasElement image, in DOMString repetition);
731
+ CanvasPattern createPattern(in HTMLVideoElement image, in DOMString repetition);
732
+
733
+ // line caps/joins
734
+ attribute float lineWidth; // (default 1)
735
+ attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
736
+ attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
737
+ attribute float miterLimit; // (default 10)
738
+
739
+ // shadows
740
+ attribute float shadowOffsetX; // (default 0)
741
+ attribute float shadowOffsetY; // (default 0)
742
+ attribute float shadowBlur; // (default 0)
743
+ attribute DOMString shadowColor; // (default transparent black)
744
+
745
+ // rects
746
+ void clearRect(in float x, in float y, in float w, in float h);
747
+ void fillRect(in float x, in float y, in float w, in float h);
748
+ void strokeRect(in float x, in float y, in float w, in float h);
749
+
750
+ // path API
751
+ void beginPath();
752
+ void closePath();
753
+ void moveTo(in float x, in float y);
754
+ void lineTo(in float x, in float y);
755
+ void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
756
+ void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
757
+ void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius);
758
+ void rect(in float x, in float y, in float w, in float h);
759
+ void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise);
760
+ void fill();
761
+ void stroke();
762
+ void clip();
763
+ boolean isPointInPath(in float x, in float y);
764
+
765
+ // text
766
+ attribute DOMString font; // (default 10px sans-serif)
767
+ attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
768
+ attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
769
+ void fillText(in DOMString text, in float x, in float y, in optional float maxWidth);
770
+ void strokeText(in DOMString text, in float x, in float y, in optional float maxWidth);
771
+ TextMetrics measureText(in DOMString text);
772
+
773
+ // drawing images
774
+ void drawImage(in HTMLImageElement image, in float dx, in float dy, in optional float dw, in float dh);
775
+ void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
776
+ void drawImage(in HTMLCanvasElement image, in float dx, in float dy, in optional float dw, in float dh);
777
+ void drawImage(in HTMLCanvasElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
778
+ void drawImage(in HTMLVideoElement image, in float dx, in float dy, in optional float dw, in float dh);
779
+ void drawImage(in HTMLVideoElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
780
+
781
+ // pixel manipulation
782
+ ImageData createImageData(in float sw, in float sh);
783
+ ImageData createImageData(in ImageData imagedata);
784
+ ImageData getImageData(in float sx, in float sy, in float sw, in float sh);
785
+ void putImageData(in ImageData imagedata, in float dx, in float dy, in optional float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
786
+ };
787
+
788
+ interface CanvasGradient {
789
+ // opaque object
790
+ void addColorStop(in float offset, in DOMString color);
791
+ };
792
+
793
+ interface CanvasPattern {
794
+ // opaque object
795
+ };
796
+
797
+ interface TextMetrics {
798
+ readonly attribute float width;
799
+ };
800
+
801
+ interface ImageData {
802
+ readonly attribute unsigned long width;
803
+ readonly attribute unsigned long height;
804
+ readonly attribute CanvasPixelArray data;
805
+ };
806
+
807
+ interface CanvasPixelArray {
808
+ readonly attribute unsigned long length;
809
+ getter octet (in unsigned long index);
810
+ setter void (in unsigned long index, in octet value);
811
+ };interface HTMLMapElement : HTMLElement {
812
+ attribute DOMString name;
813
+ readonly attribute HTMLCollection areas;
814
+ readonly attribute HTMLCollection images;
815
+ };interface HTMLAreaElement : HTMLElement {
816
+ attribute DOMString alt;
817
+ attribute DOMString coords;
818
+ attribute DOMString shape;
819
+ stringifier attribute DOMString href;
820
+ attribute DOMString target;
821
+ attribute DOMString ping;
822
+ attribute DOMString rel;
823
+ readonly attribute DOMTokenList relList;
824
+ attribute DOMString media;
825
+ attribute DOMString hreflang;
826
+ attribute DOMString type;
827
+
828
+ // URL decomposition IDL attributes
829
+ attribute DOMString protocol;
830
+ attribute DOMString host;
831
+ attribute DOMString hostname;
832
+ attribute DOMString port;
833
+ attribute DOMString pathname;
834
+ attribute DOMString search;
835
+ attribute DOMString hash;
836
+ };interface HTMLTableElement : HTMLElement {
837
+ attribute HTMLTableCaptionElement caption;
838
+ HTMLElement createCaption();
839
+ void deleteCaption();
840
+ attribute HTMLTableSectionElement tHead;
841
+ HTMLElement createTHead();
842
+ void deleteTHead();
843
+ attribute HTMLTableSectionElement tFoot;
844
+ HTMLElement createTFoot();
845
+ void deleteTFoot();
846
+ readonly attribute HTMLCollection tBodies;
847
+ HTMLElement createTBody();
848
+ readonly attribute HTMLCollection rows;
849
+ HTMLElement insertRow(in optional long index);
850
+ void deleteRow(in long index);
851
+ attribute DOMString summary;
852
+ };interface HTMLTableCaptionElement : HTMLElement {};interface HTMLTableColElement : HTMLElement {
853
+ attribute unsigned long span;
854
+ };interface HTMLTableSectionElement : HTMLElement {
855
+ readonly attribute HTMLCollection rows;
856
+ HTMLElement insertRow(in optional long index);
857
+ void deleteRow(in long index);
858
+ };interface HTMLTableRowElement : HTMLElement {
859
+ readonly attribute long rowIndex;
860
+ readonly attribute long sectionRowIndex;
861
+ readonly attribute HTMLCollection cells;
862
+ HTMLElement insertCell(in optional long index);
863
+ 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
+ };
869
+
870
+ typedef sequence<any> PropertyValueArray;
871
+
872
+ interface PropertyNodeList : NodeList {
873
+ readonly attribute PropertyValueArray values;
874
+ };interface HTMLTableHeaderCellElement : HTMLTableCellElement {
875
+ attribute DOMString scope;
876
+ };interface HTMLTableCellElement : HTMLElement {
877
+ attribute unsigned long colSpan;
878
+ attribute unsigned long rowSpan;
879
+ attribute DOMString headers;
880
+ readonly attribute long cellIndex;
881
+ };[OverrideBuiltins]
882
+ interface HTMLFormElement : HTMLElement {
883
+ attribute DOMString acceptCharset;
884
+ attribute DOMString action;
885
+ attribute boolean autocomplete;
886
+ attribute DOMString enctype;
887
+ attribute DOMString method;
888
+ attribute DOMString name;
889
+ attribute boolean noValidate;
890
+ attribute DOMString target;
891
+
892
+ readonly attribute HTMLFormControlsCollection elements;
893
+ readonly attribute long length;
894
+ caller getter any item(in unsigned long index);
895
+ caller getter any namedItem(in DOMString name);
896
+
897
+ void submit();
898
+ void reset();
899
+ boolean checkValidity();
900
+
901
+ void dispatchFormInput();
902
+ void dispatchFormChange();
903
+ };interface HTMLFieldSetElement : HTMLElement {
904
+ attribute boolean disabled;
905
+ readonly attribute HTMLFormElement form;
906
+ attribute DOMString name;
907
+
908
+ readonly attribute DOMString type;
909
+
910
+ readonly attribute HTMLFormControlsCollection elements;
911
+
912
+ readonly attribute boolean willValidate;
913
+ readonly attribute ValidityState validity;
914
+ readonly attribute DOMString validationMessage;
915
+ boolean checkValidity();
916
+ void setCustomValidity(in DOMString error);
917
+ };interface HTMLLegendElement : HTMLElement {
918
+ readonly attribute HTMLFormElement form;
919
+ };interface HTMLLabelElement : HTMLElement {
920
+ readonly attribute HTMLFormElement form;
921
+ attribute DOMString htmlFor;
922
+ readonly attribute HTMLElement control;
923
+ };interface HTMLInputElement : HTMLElement {
924
+ attribute DOMString accept;
925
+ attribute DOMString alt;
926
+ attribute boolean autocomplete;
927
+ attribute boolean autofocus;
928
+ attribute boolean defaultChecked;
929
+ attribute boolean checked;
930
+ attribute boolean disabled;
931
+ readonly attribute HTMLFormElement form;
932
+ readonly attribute FileList files;
933
+ attribute DOMString formAction;
934
+ attribute DOMString formEnctype;
935
+ attribute DOMString formMethod;
936
+ attribute boolean formNoValidate;
937
+ attribute DOMString formTarget;
938
+ attribute DOMString height;
939
+ attribute boolean indeterminate;
940
+ readonly attribute HTMLElement list;
941
+ attribute DOMString max;
942
+ attribute long maxLength;
943
+ attribute DOMString min;
944
+ attribute boolean multiple;
945
+ attribute DOMString name;
946
+ attribute DOMString pattern;
947
+ attribute DOMString placeholder;
948
+ attribute boolean readOnly;
949
+ attribute boolean required;
950
+ attribute unsigned long size;
951
+ attribute DOMString src;
952
+ attribute DOMString step;
953
+ attribute DOMString type;
954
+ attribute DOMString defaultValue;
955
+ attribute DOMString value;
956
+ attribute Date valueAsDate;
957
+ attribute float valueAsNumber;
958
+ readonly attribute HTMLOptionElement selectedOption;
959
+ attribute DOMString width;
960
+
961
+ void stepUp(in optional long n);
962
+ void stepDown(in optional long n);
963
+
964
+ readonly attribute boolean willValidate;
965
+ readonly attribute ValidityState validity;
966
+ readonly attribute DOMString validationMessage;
967
+ boolean checkValidity();
968
+ void setCustomValidity(in DOMString error);
969
+
970
+ readonly attribute NodeList labels;
971
+
972
+ void select();
973
+ attribute unsigned long selectionStart;
974
+ attribute unsigned long selectionEnd;
975
+ void setSelectionRange(in unsigned long start, in unsigned long end);
976
+ };interface HTMLButtonElement : HTMLElement {
977
+ attribute boolean autofocus;
978
+ attribute boolean disabled;
979
+ readonly attribute HTMLFormElement form;
980
+ attribute DOMString formAction;
981
+ attribute DOMString formEnctype;
982
+ attribute DOMString formMethod;
983
+ attribute DOMString formNoValidate;
984
+ attribute DOMString formTarget;
985
+ attribute DOMString name;
986
+ attribute DOMString type;
987
+ attribute DOMString value;
988
+
989
+ readonly attribute boolean willValidate;
990
+ readonly attribute ValidityState validity;
991
+ readonly attribute DOMString validationMessage;
992
+ boolean checkValidity();
993
+ void setCustomValidity(in DOMString error);
994
+
995
+ readonly attribute NodeList labels;
996
+ };interface HTMLSelectElement : HTMLElement {
997
+ attribute boolean autofocus;
998
+ attribute boolean disabled;
999
+ readonly attribute HTMLFormElement form;
1000
+ attribute boolean multiple;
1001
+ attribute DOMString name;
1002
+ attribute unsigned long size;
1003
+
1004
+ readonly attribute DOMString type;
1005
+
1006
+ readonly attribute HTMLOptionsCollection options;
1007
+ attribute unsigned long length;
1008
+ caller getter any item(in unsigned long index);
1009
+ caller getter any namedItem(in DOMString name);
1010
+ void add(in HTMLElement element, in optional HTMLElement before);
1011
+ void add(in HTMLElement element, in long before);
1012
+ void remove(in long index);
1013
+
1014
+ readonly attribute HTMLCollection selectedOptions;
1015
+ attribute long selectedIndex;
1016
+ attribute DOMString value;
1017
+
1018
+ readonly attribute boolean willValidate;
1019
+ readonly attribute ValidityState validity;
1020
+ readonly attribute DOMString validationMessage;
1021
+ boolean checkValidity();
1022
+ void setCustomValidity(in DOMString error);
1023
+
1024
+ readonly attribute NodeList labels;
1025
+ };interface HTMLDataListElement : HTMLElement {
1026
+ 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 {
1036
+ attribute boolean disabled;
1037
+ attribute DOMString label;
1038
+ };[NamedConstructor=Option(),
1039
+ NamedConstructor=Option(in DOMString text),
1040
+ NamedConstructor=Option(in DOMString text, in DOMString value),
1041
+ NamedConstructor=Option(in DOMString text, in DOMString value, in boolean defaultSelected),
1042
+ NamedConstructor=Option(in DOMString text, in DOMString value, in boolean defaultSelected, in boolean selected)]
1043
+ interface HTMLOptionElement : HTMLElement {
1044
+ attribute boolean disabled;
1045
+ readonly attribute HTMLFormElement form;
1046
+ attribute DOMString label;
1047
+ attribute boolean defaultSelected;
1048
+ attribute boolean selected;
1049
+ attribute DOMString value;
1050
+
1051
+ attribute DOMString text;
1052
+ readonly attribute long index;
1053
+ };interface HTMLTextAreaElement : HTMLElement {
1054
+ attribute boolean autofocus;
1055
+ attribute unsigned long cols;
1056
+ attribute boolean disabled;
1057
+ readonly attribute HTMLFormElement form;
1058
+ attribute long maxLength;
1059
+ attribute DOMString name;
1060
+ attribute DOMString placeholder;
1061
+ attribute boolean readOnly;
1062
+ attribute boolean required;
1063
+ attribute unsigned long rows;
1064
+ attribute DOMString wrap;
1065
+
1066
+ readonly attribute DOMString type;
1067
+ attribute DOMString defaultValue;
1068
+ attribute DOMString value;
1069
+ readonly attribute unsigned long textLength;
1070
+
1071
+ readonly attribute boolean willValidate;
1072
+ readonly attribute ValidityState validity;
1073
+ readonly attribute DOMString validationMessage;
1074
+ boolean checkValidity();
1075
+ void setCustomValidity(in DOMString error);
1076
+
1077
+ readonly attribute NodeList labels;
1078
+
1079
+ void select();
1080
+ attribute unsigned long selectionStart;
1081
+ attribute unsigned long selectionEnd;
1082
+ void setSelectionRange(in unsigned long start, in unsigned long end);
1083
+ };interface HTMLKeygenElement : HTMLElement {
1084
+ attribute boolean autofocus;
1085
+ attribute DOMString challenge;
1086
+ attribute boolean disabled;
1087
+ readonly attribute HTMLFormElement form;
1088
+ attribute DOMString keytype;
1089
+ attribute DOMString name;
1090
+
1091
+ readonly attribute DOMString type;
1092
+
1093
+ readonly attribute boolean willValidate;
1094
+ readonly attribute ValidityState validity;
1095
+ readonly attribute DOMString validationMessage;
1096
+ boolean checkValidity();
1097
+ void setCustomValidity(in DOMString error);
1098
+
1099
+ readonly attribute NodeList labels;
1100
+ };interface HTMLOutputElement : HTMLElement {
1101
+ attribute DOMString htmlFor;
1102
+ readonly attribute HTMLFormElement form;
1103
+ attribute DOMString name;
1104
+
1105
+ readonly attribute DOMString type;
1106
+ attribute DOMString defaultValue;
1107
+ attribute DOMString value;
1108
+
1109
+ readonly attribute boolean willValidate;
1110
+ readonly attribute ValidityState validity;
1111
+ readonly attribute DOMString validationMessage;
1112
+ boolean checkValidity();
1113
+ void setCustomValidity(in DOMString error);
1114
+ };interface ValidityState {
1115
+ readonly attribute boolean valueMissing;
1116
+ readonly attribute boolean typeMismatch;
1117
+ readonly attribute boolean patternMismatch;
1118
+ readonly attribute boolean tooLong;
1119
+ readonly attribute boolean rangeUnderflow;
1120
+ readonly attribute boolean rangeOverflow;
1121
+ readonly attribute boolean stepMismatch;
1122
+ readonly attribute boolean customError;
1123
+ readonly attribute boolean valid;
1124
+ };interface HTMLDetailsElement : HTMLElement {
1125
+ attribute boolean open;
1126
+ };interface HTMLCommandElement : HTMLElement {
1127
+ attribute DOMString type;
1128
+ attribute DOMString label;
1129
+ attribute DOMString icon;
1130
+ attribute boolean disabled;
1131
+ attribute boolean checked;
1132
+ attribute DOMString radiogroup;
1133
+ };interface HTMLMenuElement : HTMLElement {
1134
+ attribute DOMString type;
1135
+ attribute DOMString label;
1136
+ };[OverrideBuiltins]
1137
+ interface Window {
1138
+ // the current browsing context
1139
+ readonly attribute WindowProxy window;
1140
+ readonly attribute WindowProxy self;
1141
+ attribute DOMString name;
1142
+ [PutForwards=href] readonly attribute Location location;
1143
+ readonly attribute History history;
1144
+ readonly attribute UndoManager undoManager;
1145
+ Selection getSelection();
1146
+ [Replaceable] readonly attribute BarProp locationbar;
1147
+ [Replaceable] readonly attribute BarProp menubar;
1148
+ [Replaceable] readonly attribute BarProp personalbar;
1149
+ [Replaceable] readonly attribute BarProp scrollbars;
1150
+ [Replaceable] readonly attribute BarProp statusbar;
1151
+ [Replaceable] readonly attribute BarProp toolbar;
1152
+ void close();
1153
+ void focus();
1154
+ void blur();
1155
+
1156
+ // other browsing contexts
1157
+ [Replaceable] readonly attribute WindowProxy frames;
1158
+ [Replaceable] readonly attribute unsigned long length;
1159
+ readonly attribute WindowProxy top;
1160
+ [Replaceable] readonly attribute WindowProxy opener;
1161
+ readonly attribute WindowProxy parent;
1162
+ readonly attribute Element frameElement;
1163
+ WindowProxy open(in optional DOMString url, in optional DOMString target, in optional DOMString features, in optional DOMString replace);
1164
+ getter WindowProxy (in unsigned long index);
1165
+ getter WindowProxy (in DOMString name);
1166
+
1167
+ // the user agent
1168
+ readonly attribute Navigator navigator;
1169
+ readonly attribute ApplicationCache applicationCache;
1170
+
1171
+ // user prompts
1172
+ void alert(in DOMString message);
1173
+ boolean confirm(in DOMString message);
1174
+ DOMString prompt(in DOMString message, in optional DOMString default);
1175
+ void print();
1176
+ any showModalDialog(in DOMString url, in optional any argument);
1177
+
1178
+ // cross-document messaging
1179
+ void postMessage(in any message, in DOMString targetOrigin);
1180
+ void postMessage(in any message, in MessagePortArray ports, in DOMString targetOrigin);
1181
+
1182
+ // event handler IDL attributes
1183
+ attribute Function onabort;
1184
+ attribute Function onafterprint;
1185
+ attribute Function onbeforeprint;
1186
+ attribute Function onbeforeunload;
1187
+ attribute Function onblur;
1188
+ attribute Function oncanplay;
1189
+ attribute Function oncanplaythrough;
1190
+ attribute Function onchange;
1191
+ attribute Function onclick;
1192
+ attribute Function oncontextmenu;
1193
+ attribute Function ondblclick;
1194
+ attribute Function ondrag;
1195
+ attribute Function ondragend;
1196
+ attribute Function ondragenter;
1197
+ attribute Function ondragleave;
1198
+ attribute Function ondragover;
1199
+ attribute Function ondragstart;
1200
+ attribute Function ondrop;
1201
+ attribute Function ondurationchange;
1202
+ attribute Function onemptied;
1203
+ attribute Function onended;
1204
+ attribute Function onerror;
1205
+ attribute Function onfocus;
1206
+ attribute Function onformchange;
1207
+ attribute Function onforminput;
1208
+ attribute Function onhashchange;
1209
+ attribute Function oninput;
1210
+ attribute Function oninvalid;
1211
+ attribute Function onkeydown;
1212
+ attribute Function onkeypress;
1213
+ attribute Function onkeyup;
1214
+ attribute Function onload;
1215
+ attribute Function onloadeddata;
1216
+ attribute Function onloadedmetadata;
1217
+ attribute Function onloadstart;
1218
+ attribute Function onmessage;
1219
+ attribute Function onmousedown;
1220
+ attribute Function onmousemove;
1221
+ attribute Function onmouseout;
1222
+ attribute Function onmouseover;
1223
+ attribute Function onmouseup;
1224
+ attribute Function onmousewheel;
1225
+ attribute Function onoffline;
1226
+ attribute Function ononline;
1227
+ attribute Function onpause;
1228
+ attribute Function onplay;
1229
+ attribute Function onplaying;
1230
+ attribute Function onpagehide;
1231
+ attribute Function onpageshow;
1232
+ attribute Function onpopstate;
1233
+ attribute Function onprogress;
1234
+ attribute Function onratechange;
1235
+ attribute Function onreadystatechange;
1236
+ attribute Function onredo;
1237
+ attribute Function onresize;
1238
+ attribute Function onscroll;
1239
+ attribute Function onseeked;
1240
+ attribute Function onseeking;
1241
+ attribute Function onselect;
1242
+ attribute Function onshow;
1243
+ attribute Function onstalled;
1244
+ attribute Function onstorage;
1245
+ attribute Function onsubmit;
1246
+ attribute Function onsuspend;
1247
+ attribute Function ontimeupdate;
1248
+ attribute Function onundo;
1249
+ attribute Function onunload;
1250
+ attribute Function onvolumechange;
1251
+ attribute Function onwaiting;
1252
+ };
1253
+ Window implements EventTarget;interface DOMSettableTokenList : DOMTokenList {
1254
+ attribute DOMString value;
1255
+ };interface BarProp {
1256
+ 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
+ };
1274
+ Navigator implements NavigatorID;
1275
+ Navigator implements NavigatorOnLine;
1276
+ Navigator implements NavigatorAbilities;
1277
+
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;
1284
+ };
1285
+
1286
+ [Supplemental, NoInterfaceObject]
1287
+ interface NavigatorOnLine {
1288
+ readonly attribute boolean onLine;
1289
+ };
1290
+
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 {
1298
+
1299
+ // update status
1300
+ const unsigned short UNCACHED = 0;
1301
+ const unsigned short IDLE = 1;
1302
+ const unsigned short CHECKING = 2;
1303
+ const unsigned short DOWNLOADING = 3;
1304
+ const unsigned short UPDATEREADY = 4;
1305
+ const unsigned short OBSOLETE = 5;
1306
+ readonly attribute unsigned short status;
1307
+
1308
+ // updates
1309
+ void update();
1310
+ void swapCache();
1311
+
1312
+ // events
1313
+ attribute Function onchecking;
1314
+ attribute Function onerror;
1315
+ attribute Function onnoupdate;
1316
+ attribute Function ondownloading;
1317
+ attribute Function onprogress;
1318
+ attribute Function onupdateready;
1319
+ attribute Function oncached;
1320
+ attribute Function onobsolete;
1321
+ };
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();
1338
+
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;
1347
+
1348
+ // resolving relative URLs
1349
+ DOMString resolveURL(in DOMString url);
1350
+ };interface BeforeUnloadEvent : Event {
1351
+ 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 {
1358
+ readonly attribute Node anchorNode;
1359
+ readonly attribute long anchorOffset;
1360
+ readonly attribute Node focusNode;
1361
+ readonly attribute long focusOffset;
1362
+ readonly attribute boolean isCollapsed;
1363
+ void collapse(in Node parentNode, in long offset);
1364
+ void collapseToStart();
1365
+ void collapseToEnd();
1366
+ void selectAllChildren(in Node parentNode);
1367
+ void deleteFromDocument();
1368
+ readonly attribute long rangeCount;
1369
+ Range getRangeAt(in long index);
1370
+ void addRange(in Range range);
1371
+ void removeRange(in Range range);
1372
+ void removeAllRanges();
1373
+ stringifier DOMString ();
1374
+ };
1375
+
1376
+ interface DragEvent : MouseEvent {
1377
+ readonly attribute DataTransfer dataTransfer;
1378
+
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);
1380
+ };
1381
+
1382
+ interface DataTransfer {
1383
+ attribute DOMString dropEffect;
1384
+ attribute DOMString effectAllowed;
1385
+
1386
+ readonly attribute DOMStringList types;
1387
+ void clearData(in optional DOMString format);
1388
+ void setData(in DOMString format, in DOMString data);
1389
+ DOMString getData(in DOMString format);
1390
+ readonly attribute FileList files;
1391
+
1392
+ void setDragImage(in Element image, in long x, in long y);
1393
+ void addElement(in Element element);
1394
+ };interface UndoManager {
1395
+ readonly attribute unsigned long length;
1396
+ getter any item(in unsigned long index);
1397
+ readonly attribute unsigned long position;
1398
+ unsigned long add(in any data, in DOMString title);
1399
+ void remove(in unsigned long index);
1400
+ void clearUndo();
1401
+ void clearRedo();
1402
+ };interface UndoManagerEvent : Event {
1403
+ readonly attribute any data;
1404
+ void initUndoManagerEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg);
1405
+ };interface MessageEvent : Event {
1406
+ readonly attribute any data;
1407
+ readonly attribute DOMString origin;
1408
+ readonly attribute DOMString lastEventId;
1409
+ readonly attribute WindowProxy source;
1410
+ readonly attribute MessagePortArray ports;
1411
+ 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]
1413
+ interface MessageChannel {
1414
+ readonly attribute MessagePort port1;
1415
+ readonly attribute MessagePort port2;
1416
+ };typedef sequence<MessagePort> MessagePortArray;
1417
+
1418
+ interface MessagePort {
1419
+ void postMessage(in any message, in optional MessagePortArray ports);
1420
+ void start();
1421
+ void close();
1422
+
1423
+ // event handlers
1424
+ attribute Function onmessage;
1425
+ };
1426
+ MessagePort implements EventTarget;
1427
+
1428
+ interface HTMLAppletElement : HTMLElement {
1429
+ attribute DOMString align;
1430
+ attribute DOMString alt;
1431
+ attribute DOMString archive;
1432
+ attribute DOMString code;
1433
+ attribute DOMString codeBase;
1434
+ attribute DOMString height;
1435
+ attribute unsigned long hspace;
1436
+ attribute DOMString name;
1437
+ attribute DOMString _object; // the underscore is not part of the identifier
1438
+ attribute unsigned long vspace;
1439
+ attribute DOMString width;
1440
+ };