webidl 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ projectDirectory = "$CWD"
data/Gemfile CHANGED
@@ -6,4 +6,6 @@ gemspec
6
6
  group :test do
7
7
  gem "ruby-debug", :platform => :ruby_18
8
8
  gem "ruby-debug19", :platform => :ruby_19
9
+ gem 'guard'
10
+ gem 'guard-rspec'
9
11
  end
@@ -0,0 +1,9 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'rspec', :version => 2 do
5
+ watch(%r{^spec/.+_spec\.rb$})
6
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ watch('spec/spec_helper.rb') { "spec" }
8
+ end
9
+
data/Rakefile CHANGED
@@ -33,11 +33,11 @@ namespace :webidl do
33
33
  size = 0
34
34
 
35
35
  File.open(spec_file, "w") do |file|
36
- file << data = open(SPEC_URL).read
36
+ file << data = open(WEBIDL_URL).read
37
37
  size = data.bytesize
38
38
  end
39
39
 
40
- puts "#{SPEC_URL} => #{spec_file} (#{size} bytes)"
40
+ puts "#{WEBIDL_URL} => #{spec_file} (#{size} bytes)"
41
41
  end
42
42
 
43
43
  desc "Download and extract HTML5 IDL parts to spec/fixtures"
@@ -24,6 +24,7 @@ require "webidl/parse_tree/absolute_scoped_name"
24
24
  require "webidl/parse_tree/sequence_type"
25
25
  require "webidl/parse_tree/type_suffix"
26
26
  require "webidl/parse_tree/type"
27
+ require "webidl/parse_tree/callback"
27
28
  require "webidl/parse_tree/operation"
28
29
  require "webidl/parse_tree/const"
29
30
  require "webidl/parse_tree/enum"
@@ -35,8 +36,8 @@ require "webidl/parse_tree/scoped_name_list"
35
36
  require "webidl/parse_tree/stringifier_attribute_or_operation"
36
37
 
37
38
  require "webidl/ast/node"
38
- require "webidl/ast/module"
39
39
  require "webidl/ast/typedef"
40
+ require "webidl/ast/callback"
40
41
  require "webidl/ast/interface"
41
42
  require "webidl/ast/dictionary"
42
43
  require "webidl/ast/dictionary_member"
@@ -0,0 +1,16 @@
1
+ module WebIDL
2
+ module Ast
3
+ class Callback < Node
4
+
5
+ attr_reader :name, :return_type, :arguments
6
+ attr_accessor :extended_attributes
7
+
8
+ def initialize(name, return_type, arguments)
9
+ @name = name
10
+ @return_type = return_type
11
+ @arguments = arguments
12
+ end
13
+
14
+ end # Operation
15
+ end # Ast
16
+ end # WebIDL
@@ -0,0 +1,15 @@
1
+ module WebIDL
2
+ module ParseTree
3
+ class Callback < Treetop::Runtime::SyntaxNode
4
+
5
+ def build(parent)
6
+ Ast::Callback.new(
7
+ name.text_value,
8
+ return_type.build(parent),
9
+ args.empty? ? [] : args.build(parent)
10
+ )
11
+ end
12
+
13
+ end # Operation
14
+ end # ParseTree
15
+ end # WebIDL
@@ -6,6 +6,7 @@ module WebIDL
6
6
  return [] if metadef.empty?
7
7
 
8
8
  if metadef.d.any?
9
+ p metadef.d unless metadef.d.respond_to? :build
9
10
  definition = metadef.d.build(parent)
10
11
  definition.extended_attributes = metadef.eal.build(parent) unless metadef.eal.empty?
11
12
  end
@@ -11,7 +11,6 @@ module WebIDL
11
11
  operation = self
12
12
  end
13
13
 
14
- debugger unless operation.type.respond_to?(:build)
15
14
  typ = operation.type.build(parent)
16
15
  name = operation.optional_id.text_value unless operation.optional_id.empty?
17
16
  arguments = operation.args.build(parent) unless operation.args.empty?
@@ -9,18 +9,22 @@ module WebIDL
9
9
  end
10
10
 
11
11
  rule Definition
12
- Module
12
+ CallbackOrInterface
13
13
  / Interface
14
- / Dictionary
15
14
  / Partial
15
+ / Dictionary
16
16
  / Exception
17
+ / Enum
17
18
  / TypeDef
18
19
  / ImplementsStatement
19
- / Enum
20
20
  end
21
-
22
- rule Module
23
- "module" ws name:identifier ws "{" ws defs:Definitions ws "}" ws ";" <ParseTree::Module>
21
+
22
+ rule CallbackOrInterface
23
+ "callback" ws obj:CallbackRestOrInterface { def build(parent) obj.build(parent) end }
24
+ end
25
+
26
+ rule CallbackRestOrInterface
27
+ CallbackRest / Interface
24
28
  end
25
29
 
26
30
  rule Interface
@@ -89,6 +93,10 @@ module WebIDL
89
93
  rule ExceptionMembers
90
94
  (eal:ExtendedAttributeList ws member:ExceptionMember ws members:ExceptionMembers ws <ParseTree::InterfaceMembers>)?
91
95
  end
96
+
97
+ rule CallbackRest
98
+ name:identifier ws "=" ws return_type:ReturnType ws "(" ws args:ArgumentList ")" ws ";" <ParseTree::Callback>
99
+ end
92
100
 
93
101
  rule TypeDef
94
102
  "typedef" ws type:Type ws name:identifier ws ";" <ParseTree::TypeDef>
@@ -1,3 +1,3 @@
1
1
  module WebIDL
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -2,49 +2,36 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe WebIDL::Ast do
4
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
5
+ it "creates a typedef" do
6
+ definitions = parse(fixture("typedef.idl")).build
14
7
 
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)
8
+ definitions.should be_kind_of(Array)
23
9
 
24
- typedef = mod.definitions.first
10
+ typedef = definitions.first
25
11
  typedef.should be_kind_of(WebIDL::Ast::TypeDef)
26
12
 
27
13
  typedef.type.should == 'DOMString'
28
14
  typedef.name.should == 'string'
29
- typedef.qualified_name.should == '::gui::string'
15
+ typedef.qualified_name.should == '::string'
30
16
  end
31
17
 
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)
18
+ it "creates an extended attribute (no args)" do
19
+ intf = parse(fixture("xattr_no_arg.idl")).build.first
20
+ intf.should be_kind_of(WebIDL::Ast::Interface)
35
21
 
36
- xattrs = mod.extended_attributes
22
+ xattrs = intf.extended_attributes
37
23
  xattrs.size.should == 1
38
24
 
39
25
  xattrs.first.should be_kind_of(WebIDL::Ast::ExtendedAttribute)
40
26
  xattrs.first.name.should == 'OverrideBuiltins'
41
27
  end
42
28
 
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
29
 
47
- xattrs = mod.extended_attributes
30
+ it "creates an extended attribute (two args)" do
31
+ intf = parse(fixture("xattr_two_args.idl")).build.first
32
+ intf.should be_kind_of(WebIDL::Ast::Interface)
33
+
34
+ xattrs = intf.extended_attributes
48
35
  xattrs.size.should == 1
49
36
 
50
37
  xattr = xattrs.first
@@ -57,11 +44,11 @@ describe WebIDL::Ast do
57
44
  xattr.args.each { |a| a.should be_kind_of(WebIDL::Ast::Argument) }
58
45
  end
59
46
 
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)
47
+ it "creates extended attribute (named args)" do
48
+ intf = parse(fixture("xattr_named_args.idl")).build.first
49
+ intf.should be_kind_of(WebIDL::Ast::Interface)
63
50
 
64
- xattrs = mod.extended_attributes
51
+ xattrs = intf.extended_attributes
65
52
  xattrs.should be_kind_of(Array)
66
53
 
67
54
  xattr = xattrs.first
@@ -71,11 +58,11 @@ describe WebIDL::Ast do
71
58
  xattr.last.should be_kind_of(WebIDL::Ast::ExtendedAttribute)
72
59
  end
73
60
 
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)
61
+ it "creates an extended attribute (ident)" do
62
+ intf = parse(fixture("xattr_ident.idl")).build.first
63
+ intf.should be_kind_of(WebIDL::Ast::Interface)
77
64
 
78
- xattrs = mod.extended_attributes
65
+ xattrs = intf.extended_attributes
79
66
  xattrs.should be_kind_of(Array)
80
67
 
81
68
  xattr = xattrs.first
@@ -85,11 +72,11 @@ describe WebIDL::Ast do
85
72
  xattr.last.should == "name"
86
73
  end
87
74
 
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)
75
+ it "creates an extended attribute (scoped name)" do
76
+ intf = parse(fixture("xattr_scoped.idl")).build.first
77
+ intf.should be_kind_of(WebIDL::Ast::Interface)
91
78
 
92
- xattrs = mod.extended_attributes
79
+ xattrs = intf.extended_attributes
93
80
  xattrs.should be_kind_of(Array)
94
81
 
95
82
  xattr = xattrs.first
@@ -156,23 +143,18 @@ describe WebIDL::Ast do
156
143
  end
157
144
 
158
145
  it "creates a framework from the example in the WebIDL spec" do
159
- mod = parse(fixture("framework.idl")).build.first
160
- mod.definitions.size.should == 4
161
- mod.definitions.map { |e| e.class}.should == [
146
+ definitions = parse(fixture("framework.idl")).build
147
+ definitions.size.should == 4
148
+ definitions.map { |e| e.class}.should == [
162
149
  WebIDL::Ast::TypeDef,
163
150
  WebIDL::Ast::Exception,
164
151
  WebIDL::Ast::Interface,
165
- WebIDL::Ast::Module
152
+ WebIDL::Ast::Interface,
166
153
  ]
167
154
 
168
- inner_mod = mod.definitions[3]
169
- inner_mod.name.should == 'gui'
170
- inner_mod.qualified_name.should == '::framework::gui'
171
-
172
- interface = inner_mod.definitions[0]
155
+ interface = definitions[3]
173
156
  interface.name.should == 'TextField'
174
- interface.qualified_name.should == '::framework::gui::TextField'
175
- interface.members.first.qualified_name.should == '::framework::gui::TextField::const' # or should it?
157
+ interface.members.first.qualified_name.should == '::TextField::const' # or should it?
176
158
  end
177
159
 
178
160
 
@@ -181,11 +163,10 @@ describe WebIDL::Ast do
181
163
  #
182
164
 
183
165
  it "creates an exception" do
184
- interface = parse(fixture("module_with_exception.idl")).build.first
185
- ex = interface.definitions.first
166
+ ex = parse(fixture("exception.idl")).build.first
186
167
 
187
168
  ex.name.should == "FrameworkException"
188
- ex.qualified_name.should == '::framework::FrameworkException'
169
+ ex.qualified_name.should == '::FrameworkException'
189
170
  ex.members.size.should == 2
190
171
 
191
172
  xattr = ex.extended_attributes
@@ -195,7 +176,7 @@ describe WebIDL::Ast do
195
176
 
196
177
  first.should be_kind_of(WebIDL::Ast::Const)
197
178
  first.name.should == "ERR_NOT_FOUND"
198
- first.qualified_name.should == '::framework::FrameworkException::ERR_NOT_FOUND'
179
+ first.qualified_name.should == '::FrameworkException::ERR_NOT_FOUND'
199
180
  first.type.should be_kind_of(WebIDL::Ast::Type)
200
181
  first.type.name.should == :Long
201
182
  first.value.should == 1
@@ -226,14 +207,14 @@ describe WebIDL::Ast do
226
207
  end
227
208
 
228
209
  it "creates an implements statement" do
229
- mod = parse(fixture("module_with_implements_statement.idl")).build.first
210
+ definitions = parse(fixture("implements_statement.idl")).build
230
211
 
231
- mod.definitions.first.should be_kind_of(WebIDL::Ast::Interface)
212
+ definitions.first.should be_kind_of(WebIDL::Ast::Interface)
232
213
 
233
- impls = mod.definitions.last
214
+ impls = definitions.last
234
215
  impls.should be_kind_of(WebIDL::Ast::ImplementsStatement)
235
- impls.implementor.should == "::foo::bar"
236
- impls.implementee.should == "::foo::baz"
216
+ impls.implementor.should == "::bar"
217
+ impls.implementee.should == "::baz"
237
218
  end
238
219
 
239
220
  it "builds an AST from the HTML5 spec" do
@@ -0,0 +1,9 @@
1
+ [Supplemental] exception FrameworkException {
2
+
3
+ // Constant identifier: "ERR_NOT_FOUND"
4
+ // Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND"
5
+ const long ERR_NOT_FOUND = 1;
6
+
7
+ // Exception field identifier: "code"
8
+ long code;
9
+ };
@@ -1,48 +1,36 @@
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
- };
1
+ // Typedef identifier: "number"
2
+ typedef float number;
3
+
4
+ // Exception identifier: "FrameworkException"
5
+ exception FrameworkException {
6
+
7
+ // Constant identifier: "ERR_NOT_FOUND"
8
+ const long ERR_NOT_FOUND = 1;
9
+
10
+ // Exception field identifier: "code"
11
+ long code;
12
+ };
13
+
14
+ // Interface identifier: "System"
15
+ interface System {
16
+
17
+ // Operation identifier: "createObject"
18
+ // Operation argument identifier: "interface"
19
+ object createObject(DOMString _interface);
20
+
21
+ // Operation argument identifier: "interface"
22
+ object[] createObjectArray(DOMString interface);
23
+
24
+ // Operation has no identifier; it declares a getter.
25
+ getter DOMString (DOMString keyName);
26
+ };
27
+
28
+ // Interface identifier: "TextField"
29
+ interface TextField {
30
+
31
+ // Attribute identifier: "const"
32
+ attribute boolean _const;
33
+
34
+ // Attribute identifier: "value"
35
+ attribute DOMString? _value;
36
+ };
@@ -31,7 +31,7 @@ interface HTMLOptionsCollection : HTMLCollection {
31
31
  interface HTMLPropertiesCollection : HTMLCollection {
32
32
  // inherits length and item()
33
33
  legacycaller getter PropertyNodeList? namedItem(DOMString name); // overrides inherited namedItem()
34
- readonly attribute DOMStringList names;
34
+ readonly attribute DOMString[] names;
35
35
  };
36
36
 
37
37
  typedef sequence<any> PropertyValueArray;
@@ -61,7 +61,6 @@ interface Transferable { };
61
61
  partial interface Document {
62
62
  // resource metadata management
63
63
  [PutForwards=href] readonly attribute Location? location;
64
- readonly attribute DOMString URL;
65
64
  attribute DOMString domain;
66
65
  readonly attribute DOMString referrer;
67
66
  attribute DOMString cookie;
@@ -81,7 +80,7 @@ partial interface Document {
81
80
  readonly attribute HTMLCollection forms;
82
81
  readonly attribute HTMLCollection scripts;
83
82
  NodeList getElementsByName(DOMString elementName);
84
- NodeList getItems(optional DOMString typeNames); // microdata
83
+ NodeList getItems(optional DOMString typeNames); // microdata
85
84
  readonly attribute DOMElementMap cssElementMap;
86
85
 
87
86
  // dynamic markup insertion
@@ -107,64 +106,64 @@ partial interface Document {
107
106
  readonly attribute HTMLCollection commands;
108
107
 
109
108
  // event handler IDL attributes
110
- [TreatNonCallableAsNull] attribute Function? onabort;
111
- [TreatNonCallableAsNull] attribute Function? onblur;
112
- [TreatNonCallableAsNull] attribute Function? oncancel;
113
- [TreatNonCallableAsNull] attribute Function? oncanplay;
114
- [TreatNonCallableAsNull] attribute Function? oncanplaythrough;
115
- [TreatNonCallableAsNull] attribute Function? onchange;
116
- [TreatNonCallableAsNull] attribute Function? onclick;
117
- [TreatNonCallableAsNull] attribute Function? onclose;
118
- [TreatNonCallableAsNull] attribute Function? oncontextmenu;
119
- [TreatNonCallableAsNull] attribute Function? oncuechange;
120
- [TreatNonCallableAsNull] attribute Function? ondblclick;
121
- [TreatNonCallableAsNull] attribute Function? ondrag;
122
- [TreatNonCallableAsNull] attribute Function? ondragend;
123
- [TreatNonCallableAsNull] attribute Function? ondragenter;
124
- [TreatNonCallableAsNull] attribute Function? ondragleave;
125
- [TreatNonCallableAsNull] attribute Function? ondragover;
126
- [TreatNonCallableAsNull] attribute Function? ondragstart;
127
- [TreatNonCallableAsNull] attribute Function? ondrop;
128
- [TreatNonCallableAsNull] attribute Function? ondurationchange;
129
- [TreatNonCallableAsNull] attribute Function? onemptied;
130
- [TreatNonCallableAsNull] attribute Function? onended;
131
- [TreatNonCallableAsNull] attribute Function? onerror;
132
- [TreatNonCallableAsNull] attribute Function? onfocus;
133
- [TreatNonCallableAsNull] attribute Function? oninput;
134
- [TreatNonCallableAsNull] attribute Function? oninvalid;
135
- [TreatNonCallableAsNull] attribute Function? onkeydown;
136
- [TreatNonCallableAsNull] attribute Function? onkeypress;
137
- [TreatNonCallableAsNull] attribute Function? onkeyup;
138
- [TreatNonCallableAsNull] attribute Function? onload;
139
- [TreatNonCallableAsNull] attribute Function? onloadeddata;
140
- [TreatNonCallableAsNull] attribute Function? onloadedmetadata;
141
- [TreatNonCallableAsNull] attribute Function? onloadstart;
142
- [TreatNonCallableAsNull] attribute Function? onmousedown;
143
- [TreatNonCallableAsNull] attribute Function? onmousemove;
144
- [TreatNonCallableAsNull] attribute Function? onmouseout;
145
- [TreatNonCallableAsNull] attribute Function? onmouseover;
146
- [TreatNonCallableAsNull] attribute Function? onmouseup;
147
- [TreatNonCallableAsNull] attribute Function? onmousewheel;
148
- [TreatNonCallableAsNull] attribute Function? onpause;
149
- [TreatNonCallableAsNull] attribute Function? onplay;
150
- [TreatNonCallableAsNull] attribute Function? onplaying;
151
- [TreatNonCallableAsNull] attribute Function? onprogress;
152
- [TreatNonCallableAsNull] attribute Function? onratechange;
153
- [TreatNonCallableAsNull] attribute Function? onreset;
154
- [TreatNonCallableAsNull] attribute Function? onscroll;
155
- [TreatNonCallableAsNull] attribute Function? onseeked;
156
- [TreatNonCallableAsNull] attribute Function? onseeking;
157
- [TreatNonCallableAsNull] attribute Function? onselect;
158
- [TreatNonCallableAsNull] attribute Function? onshow;
159
- [TreatNonCallableAsNull] attribute Function? onstalled;
160
- [TreatNonCallableAsNull] attribute Function? onsubmit;
161
- [TreatNonCallableAsNull] attribute Function? onsuspend;
162
- [TreatNonCallableAsNull] attribute Function? ontimeupdate;
163
- [TreatNonCallableAsNull] attribute Function? onvolumechange;
164
- [TreatNonCallableAsNull] attribute Function? onwaiting;
109
+ attribute EventHandler onabort;
110
+ attribute EventHandler onblur;
111
+ attribute EventHandler oncancel;
112
+ attribute EventHandler oncanplay;
113
+ attribute EventHandler oncanplaythrough;
114
+ attribute EventHandler onchange;
115
+ attribute EventHandler onclick;
116
+ attribute EventHandler onclose;
117
+ attribute EventHandler oncontextmenu;
118
+ attribute EventHandler oncuechange;
119
+ attribute EventHandler ondblclick;
120
+ attribute EventHandler ondrag;
121
+ attribute EventHandler ondragend;
122
+ attribute EventHandler ondragenter;
123
+ attribute EventHandler ondragleave;
124
+ attribute EventHandler ondragover;
125
+ attribute EventHandler ondragstart;
126
+ attribute EventHandler ondrop;
127
+ attribute EventHandler ondurationchange;
128
+ attribute EventHandler onemptied;
129
+ attribute EventHandler onended;
130
+ attribute OnErrorEventHandler onerror;
131
+ attribute EventHandler onfocus;
132
+ attribute EventHandler oninput;
133
+ attribute EventHandler oninvalid;
134
+ attribute EventHandler onkeydown;
135
+ attribute EventHandler onkeypress;
136
+ attribute EventHandler onkeyup;
137
+ attribute EventHandler onload;
138
+ attribute EventHandler onloadeddata;
139
+ attribute EventHandler onloadedmetadata;
140
+ attribute EventHandler onloadstart;
141
+ attribute EventHandler onmousedown;
142
+ attribute EventHandler onmousemove;
143
+ attribute EventHandler onmouseout;
144
+ attribute EventHandler onmouseover;
145
+ attribute EventHandler onmouseup;
146
+ attribute EventHandler onmousewheel;
147
+ attribute EventHandler onpause;
148
+ attribute EventHandler onplay;
149
+ attribute EventHandler onplaying;
150
+ attribute EventHandler onprogress;
151
+ attribute EventHandler onratechange;
152
+ attribute EventHandler onreset;
153
+ attribute EventHandler onscroll;
154
+ attribute EventHandler onseeked;
155
+ attribute EventHandler onseeking;
156
+ attribute EventHandler onselect;
157
+ attribute EventHandler onshow;
158
+ attribute EventHandler onstalled;
159
+ attribute EventHandler onsubmit;
160
+ attribute EventHandler onsuspend;
161
+ attribute EventHandler ontimeupdate;
162
+ attribute EventHandler onvolumechange;
163
+ attribute EventHandler onwaiting;
165
164
 
166
165
  // special event handler IDL attributes that only apply to Document objects
167
- [TreatNonCallableAsNull,LenientThis] attribute Function? onreadystatechange;
166
+ [LenientThis] attribute EventHandler onreadystatechange;
168
167
  };
169
168
 
170
169
  partial interface XMLDocument {
@@ -177,11 +176,9 @@ interface HTMLElement : Element {
177
176
  attribute DOMString lang;
178
177
  attribute boolean translate;
179
178
  attribute DOMString dir;
180
- attribute DOMString className;
181
- readonly attribute DOMTokenList classList;
182
179
  readonly attribute DOMStringMap dataset;
183
180
 
184
- // microdata
181
+ // microdata
185
182
  attribute boolean itemScope;
186
183
  [PutForwards=value] readonly attribute DOMSettableTokenList itemType;
187
184
  attribute DOMString itemId;
@@ -217,61 +214,61 @@ interface HTMLElement : Element {
217
214
  readonly attribute CSSStyleDeclaration style;
218
215
 
219
216
  // event handler IDL attributes
220
- [TreatNonCallableAsNull] attribute Function? onabort;
221
- [TreatNonCallableAsNull] attribute Function? onblur;
222
- [TreatNonCallableAsNull] attribute Function? oncancel;
223
- [TreatNonCallableAsNull] attribute Function? oncanplay;
224
- [TreatNonCallableAsNull] attribute Function? oncanplaythrough;
225
- [TreatNonCallableAsNull] attribute Function? onchange;
226
- [TreatNonCallableAsNull] attribute Function? onclick;
227
- [TreatNonCallableAsNull] attribute Function? onclose;
228
- [TreatNonCallableAsNull] attribute Function? oncontextmenu;
229
- [TreatNonCallableAsNull] attribute Function? oncuechange;
230
- [TreatNonCallableAsNull] attribute Function? ondblclick;
231
- [TreatNonCallableAsNull] attribute Function? ondrag;
232
- [TreatNonCallableAsNull] attribute Function? ondragend;
233
- [TreatNonCallableAsNull] attribute Function? ondragenter;
234
- [TreatNonCallableAsNull] attribute Function? ondragleave;
235
- [TreatNonCallableAsNull] attribute Function? ondragover;
236
- [TreatNonCallableAsNull] attribute Function? ondragstart;
237
- [TreatNonCallableAsNull] attribute Function? ondrop;
238
- [TreatNonCallableAsNull] attribute Function? ondurationchange;
239
- [TreatNonCallableAsNull] attribute Function? onemptied;
240
- [TreatNonCallableAsNull] attribute Function? onended;
241
- [TreatNonCallableAsNull] attribute Function? onerror;
242
- [TreatNonCallableAsNull] attribute Function? onfocus;
243
- [TreatNonCallableAsNull] attribute Function? oninput;
244
- [TreatNonCallableAsNull] attribute Function? oninvalid;
245
- [TreatNonCallableAsNull] attribute Function? onkeydown;
246
- [TreatNonCallableAsNull] attribute Function? onkeypress;
247
- [TreatNonCallableAsNull] attribute Function? onkeyup;
248
- [TreatNonCallableAsNull] attribute Function? onload;
249
- [TreatNonCallableAsNull] attribute Function? onloadeddata;
250
- [TreatNonCallableAsNull] attribute Function? onloadedmetadata;
251
- [TreatNonCallableAsNull] attribute Function? onloadstart;
252
- [TreatNonCallableAsNull] attribute Function? onmousedown;
253
- [TreatNonCallableAsNull] attribute Function? onmousemove;
254
- [TreatNonCallableAsNull] attribute Function? onmouseout;
255
- [TreatNonCallableAsNull] attribute Function? onmouseover;
256
- [TreatNonCallableAsNull] attribute Function? onmouseup;
257
- [TreatNonCallableAsNull] attribute Function? onmousewheel;
258
- [TreatNonCallableAsNull] attribute Function? onpause;
259
- [TreatNonCallableAsNull] attribute Function? onplay;
260
- [TreatNonCallableAsNull] attribute Function? onplaying;
261
- [TreatNonCallableAsNull] attribute Function? onprogress;
262
- [TreatNonCallableAsNull] attribute Function? onratechange;
263
- [TreatNonCallableAsNull] attribute Function? onreset;
264
- [TreatNonCallableAsNull] attribute Function? onscroll;
265
- [TreatNonCallableAsNull] attribute Function? onseeked;
266
- [TreatNonCallableAsNull] attribute Function? onseeking;
267
- [TreatNonCallableAsNull] attribute Function? onselect;
268
- [TreatNonCallableAsNull] attribute Function? onshow;
269
- [TreatNonCallableAsNull] attribute Function? onstalled;
270
- [TreatNonCallableAsNull] attribute Function? onsubmit;
271
- [TreatNonCallableAsNull] attribute Function? onsuspend;
272
- [TreatNonCallableAsNull] attribute Function? ontimeupdate;
273
- [TreatNonCallableAsNull] attribute Function? onvolumechange;
274
- [TreatNonCallableAsNull] attribute Function? onwaiting;
217
+ attribute EventHandler onabort;
218
+ attribute EventHandler onblur;
219
+ attribute EventHandler oncancel;
220
+ attribute EventHandler oncanplay;
221
+ attribute EventHandler oncanplaythrough;
222
+ attribute EventHandler onchange;
223
+ attribute EventHandler onclick;
224
+ attribute EventHandler onclose;
225
+ attribute EventHandler oncontextmenu;
226
+ attribute EventHandler oncuechange;
227
+ attribute EventHandler ondblclick;
228
+ attribute EventHandler ondrag;
229
+ attribute EventHandler ondragend;
230
+ attribute EventHandler ondragenter;
231
+ attribute EventHandler ondragleave;
232
+ attribute EventHandler ondragover;
233
+ attribute EventHandler ondragstart;
234
+ attribute EventHandler ondrop;
235
+ attribute EventHandler ondurationchange;
236
+ attribute EventHandler onemptied;
237
+ attribute EventHandler onended;
238
+ attribute OnErrorEventHandler onerror;
239
+ attribute EventHandler onfocus;
240
+ attribute EventHandler oninput;
241
+ attribute EventHandler oninvalid;
242
+ attribute EventHandler onkeydown;
243
+ attribute EventHandler onkeypress;
244
+ attribute EventHandler onkeyup;
245
+ attribute EventHandler onload;
246
+ attribute EventHandler onloadeddata;
247
+ attribute EventHandler onloadedmetadata;
248
+ attribute EventHandler onloadstart;
249
+ attribute EventHandler onmousedown;
250
+ attribute EventHandler onmousemove;
251
+ attribute EventHandler onmouseout;
252
+ attribute EventHandler onmouseover;
253
+ attribute EventHandler onmouseup;
254
+ attribute EventHandler onmousewheel;
255
+ attribute EventHandler onpause;
256
+ attribute EventHandler onplay;
257
+ attribute EventHandler onplaying;
258
+ attribute EventHandler onprogress;
259
+ attribute EventHandler onratechange;
260
+ attribute EventHandler onreset;
261
+ attribute EventHandler onscroll;
262
+ attribute EventHandler onseeked;
263
+ attribute EventHandler onseeking;
264
+ attribute EventHandler onselect;
265
+ attribute EventHandler onshow;
266
+ attribute EventHandler onstalled;
267
+ attribute EventHandler onsubmit;
268
+ attribute EventHandler onsuspend;
269
+ attribute EventHandler ontimeupdate;
270
+ attribute EventHandler onvolumechange;
271
+ attribute EventHandler onwaiting;
275
272
  };
276
273
 
277
274
  interface HTMLUnknownElement : HTMLElement { };
@@ -325,24 +322,24 @@ interface HTMLScriptElement : HTMLElement {
325
322
  };
326
323
 
327
324
  interface HTMLBodyElement : HTMLElement {
328
- [TreatNonCallableAsNull] attribute Function? onafterprint;
329
- [TreatNonCallableAsNull] attribute Function? onbeforeprint;
330
- [TreatNonCallableAsNull] attribute Function? onbeforeunload;
331
- [TreatNonCallableAsNull] attribute Function? onblur;
332
- [TreatNonCallableAsNull] attribute Function? onerror;
333
- [TreatNonCallableAsNull] attribute Function? onfocus;
334
- [TreatNonCallableAsNull] attribute Function? onhashchange;
335
- [TreatNonCallableAsNull] attribute Function? onload;
336
- [TreatNonCallableAsNull] attribute Function? onmessage;
337
- [TreatNonCallableAsNull] attribute Function? onoffline;
338
- [TreatNonCallableAsNull] attribute Function? ononline;
339
- [TreatNonCallableAsNull] attribute Function? onpopstate;
340
- [TreatNonCallableAsNull] attribute Function? onpagehide;
341
- [TreatNonCallableAsNull] attribute Function? onpageshow;
342
- [TreatNonCallableAsNull] attribute Function? onresize;
343
- [TreatNonCallableAsNull] attribute Function? onscroll;
344
- [TreatNonCallableAsNull] attribute Function? onstorage;
345
- [TreatNonCallableAsNull] attribute Function? onunload;
325
+ attribute EventHandler onafterprint;
326
+ attribute EventHandler onbeforeprint;
327
+ attribute EventHandler onbeforeunload;
328
+ attribute EventHandler onblur;
329
+ attribute OnErrorEventHandler onerror;
330
+ attribute EventHandler onfocus;
331
+ attribute EventHandler onhashchange;
332
+ attribute EventHandler onload;
333
+ attribute EventHandler onmessage;
334
+ attribute EventHandler onoffline;
335
+ attribute EventHandler ononline;
336
+ attribute EventHandler onpopstate;
337
+ attribute EventHandler onpagehide;
338
+ attribute EventHandler onpageshow;
339
+ attribute EventHandler onresize;
340
+ attribute EventHandler onscroll;
341
+ attribute EventHandler onstorage;
342
+ attribute EventHandler onunload;
346
343
  };
347
344
 
348
345
  interface HTMLHeadingElement : HTMLElement {};
@@ -421,6 +418,9 @@ interface HTMLModElement : HTMLElement {
421
418
  interface HTMLImageElement : HTMLElement {
422
419
  attribute DOMString alt;
423
420
  attribute DOMString src;
421
+
422
+ attribute DOMString srcset;
423
+
424
424
  attribute DOMString crossOrigin;
425
425
  attribute DOMString useMap;
426
426
  attribute boolean isMap;
@@ -541,7 +541,7 @@ interface HTMLMediaElement : HTMLElement {
541
541
 
542
542
  // playback state
543
543
  attribute double currentTime;
544
- readonly attribute double duration;
544
+ readonly attribute unrestricted double duration;
545
545
  readonly attribute Date startDate;
546
546
  readonly attribute boolean paused;
547
547
  attribute double defaultPlaybackRate;
@@ -584,8 +584,9 @@ interface AudioTrackList : EventTarget {
584
584
  getter AudioTrack (unsigned long index);
585
585
  AudioTrack? getTrackById(DOMString id);
586
586
 
587
- [TreatNonCallableAsNull] attribute Function? onchange;
588
- [TreatNonCallableAsNull] attribute Function? onaddtrack;
587
+ attribute EventHandler onchange;
588
+ attribute EventHandler onaddtrack;
589
+ attribute EventHandler onremovetrack;
589
590
  };
590
591
 
591
592
  interface AudioTrack {
@@ -602,8 +603,9 @@ interface VideoTrackList : EventTarget {
602
603
  VideoTrack? getTrackById(DOMString id);
603
604
  readonly attribute long selectedIndex;
604
605
 
605
- [TreatNonCallableAsNull] attribute Function? onchange;
606
- [TreatNonCallableAsNull] attribute Function? onaddtrack;
606
+ attribute EventHandler onchange;
607
+ attribute EventHandler onaddtrack;
608
+ attribute EventHandler onremovetrack;
607
609
  };
608
610
 
609
611
  interface VideoTrack {
@@ -614,14 +616,18 @@ interface VideoTrack {
614
616
  attribute boolean selected;
615
617
  };
616
618
 
619
+ enum MediaControllerPlaybackState { "waiting", "playing", "ended" };
617
620
  [Constructor]
618
621
  interface MediaController {
622
+ readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values
623
+
619
624
  readonly attribute TimeRanges buffered;
620
625
  readonly attribute TimeRanges seekable;
621
- readonly attribute double duration;
626
+ readonly attribute unrestricted double duration;
622
627
  attribute double currentTime;
623
628
 
624
629
  readonly attribute boolean paused;
630
+ readonly attribute MediaControllerPlaybackState playbackState;
625
631
  readonly attribute TimeRanges played;
626
632
  void play();
627
633
  void pause();
@@ -632,28 +638,29 @@ interface MediaController {
632
638
  attribute double volume;
633
639
  attribute boolean muted;
634
640
 
635
- [TreatNonCallableAsNull] attribute Function? onemptied;
636
- [TreatNonCallableAsNull] attribute Function? onloadedmetadata;
637
- [TreatNonCallableAsNull] attribute Function? onloadeddata;
638
- [TreatNonCallableAsNull] attribute Function? oncanplay;
639
- [TreatNonCallableAsNull] attribute Function? oncanplaythrough;
640
- [TreatNonCallableAsNull] attribute Function? onplaying;
641
- [TreatNonCallableAsNull] attribute Function? onended;
642
- [TreatNonCallableAsNull] attribute Function? onwaiting;
641
+ attribute EventHandler onemptied;
642
+ attribute EventHandler onloadedmetadata;
643
+ attribute EventHandler onloadeddata;
644
+ attribute EventHandler oncanplay;
645
+ attribute EventHandler oncanplaythrough;
646
+ attribute EventHandler onplaying;
647
+ attribute EventHandler onended;
648
+ attribute EventHandler onwaiting;
643
649
 
644
- [TreatNonCallableAsNull] attribute Function? ondurationchange;
645
- [TreatNonCallableAsNull] attribute Function? ontimeupdate;
646
- [TreatNonCallableAsNull] attribute Function? onplay;
647
- [TreatNonCallableAsNull] attribute Function? onpause;
648
- [TreatNonCallableAsNull] attribute Function? onratechange;
649
- [TreatNonCallableAsNull] attribute Function? onvolumechange;
650
+ attribute EventHandler ondurationchange;
651
+ attribute EventHandler ontimeupdate;
652
+ attribute EventHandler onplay;
653
+ attribute EventHandler onpause;
654
+ attribute EventHandler onratechange;
655
+ attribute EventHandler onvolumechange;
650
656
  };
651
657
 
652
658
  interface TextTrackList : EventTarget {
653
659
  readonly attribute unsigned long length;
654
660
  getter TextTrack (unsigned long index);
655
661
 
656
- [TreatNonCallableAsNull] attribute Function? onaddtrack;
662
+ attribute EventHandler onaddtrack;
663
+ attribute EventHandler onremovetrack;
657
664
  };
658
665
 
659
666
  enum TextTrackMode { "disabled", "hidden", "showing" };
@@ -661,6 +668,7 @@ interface TextTrack : EventTarget {
661
668
  readonly attribute DOMString kind;
662
669
  readonly attribute DOMString label;
663
670
  readonly attribute DOMString language;
671
+ readonly attribute DOMString inBandMetadataTrackDispatchType;
664
672
 
665
673
  attribute TextTrackMode mode;
666
674
 
@@ -670,7 +678,7 @@ interface TextTrack : EventTarget {
670
678
  void addCue(TextTrackCue cue);
671
679
  void removeCue(TextTrackCue cue);
672
680
 
673
- [TreatNonCallableAsNull] attribute Function? oncuechange;
681
+ attribute EventHandler oncuechange;
674
682
  };
675
683
 
676
684
  interface TextTrackCueList {
@@ -680,7 +688,7 @@ interface TextTrackCueList {
680
688
  };
681
689
 
682
690
 
683
- [Constructor(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
691
+ [Constructor(double startTime, double endTime, DOMString text)]
684
692
  interface TextTrackCue : EventTarget {
685
693
  readonly attribute TextTrack? track;
686
694
 
@@ -697,8 +705,8 @@ interface TextTrackCue : EventTarget {
697
705
  attribute DOMString text;
698
706
  DocumentFragment getCueAsHTML();
699
707
 
700
- [TreatNonCallableAsNull] attribute Function? onenter;
701
- [TreatNonCallableAsNull] attribute Function? onexit;
708
+ attribute EventHandler onenter;
709
+ attribute EventHandler onexit;
702
710
  };
703
711
 
704
712
  interface TimeRanges {
@@ -721,7 +729,9 @@ interface HTMLCanvasElement : HTMLElement {
721
729
  attribute unsigned long height;
722
730
 
723
731
  DOMString toDataURL(optional DOMString type, any... args);
732
+ DOMString toDataURLHD(optional DOMString type, any... args);
724
733
  void toBlob(FileCallback? _callback, optional DOMString type, any... args);
734
+ void toBlobHD(FileCallback? _callback, optional DOMString type, any... args);
725
735
 
726
736
  object? getContext(DOMString contextId, any... args);
727
737
  };
@@ -737,34 +747,37 @@ interface CanvasRenderingContext2D {
737
747
 
738
748
  // transformations (default transform is the identity matrix)
739
749
  attribute SVGMatrix currentTransform;
740
- void scale(double x, double y);
741
- void rotate(double angle);
742
- void translate(double x, double y);
743
- void transform(double a, double b, double c, double d, double e, double f);
744
- void setTransform(double a, double b, double c, double d, double e, double f);
750
+ void scale(unrestricted double x, unrestricted double y);
751
+ void rotate(unrestricted double angle);
752
+ void translate(unrestricted double x, unrestricted double y);
753
+ void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
754
+ void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
745
755
  void resetTransform();
746
756
 
747
757
  // compositing
748
- attribute double globalAlpha; // (default 1.0)
758
+ attribute unrestricted double globalAlpha; // (default 1.0)
749
759
  attribute DOMString globalCompositeOperation; // (default source-over)
750
760
 
761
+ // image smoothing
762
+ attribute boolean imageSmoothingEnabled; // (default true)
763
+
751
764
  // colors and styles (see also the CanvasDrawingStyles interface)
752
765
  attribute any strokeStyle; // (default black)
753
766
  attribute any fillStyle; // (default black)
754
- CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
755
- CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
767
+ CanvasGradient createLinearGradient(unrestricted double x0, unrestricted double y0, unrestricted double x1, unrestricted double y1);
768
+ CanvasGradient createRadialGradient(unrestricted double x0, unrestricted double y0, unrestricted double r0, unrestricted double x1, unrestricted double y1, unrestricted double r1);
756
769
  CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, DOMString repetition);
757
770
 
758
771
  // shadows
759
- attribute double shadowOffsetX; // (default 0)
760
- attribute double shadowOffsetY; // (default 0)
761
- attribute double shadowBlur; // (default 0)
772
+ attribute unrestricted double shadowOffsetX; // (default 0)
773
+ attribute unrestricted double shadowOffsetY; // (default 0)
774
+ attribute unrestricted double shadowBlur; // (default 0)
762
775
  attribute DOMString shadowColor; // (default transparent black)
763
776
 
764
777
  // rects
765
- void clearRect(double x, double y, double w, double h);
766
- void fillRect(double x, double y, double w, double h);
767
- void strokeRect(double x, double y, double w, double h);
778
+ void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
779
+ void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
780
+ void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
768
781
 
769
782
  // path API (see also CanvasPathMethods)
770
783
  void beginPath();
@@ -781,29 +794,31 @@ interface CanvasRenderingContext2D {
781
794
  void clip();
782
795
  void clip(Path path);
783
796
  void resetClip();
784
- boolean isPointInPath(double x, double y);
785
- boolean isPointInPath(Path path, double x, double y);
797
+ boolean isPointInPath(unrestricted double x, unrestricted double y);
798
+ boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
786
799
 
787
800
  // text (see also the CanvasDrawingStyles interface)
788
- void fillText(DOMString text, double x, double y, optional double maxWidth);
789
- void strokeText(DOMString text, double x, double y, optional double maxWidth);
801
+ void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
802
+ void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
790
803
  TextMetrics measureText(DOMString text);
791
804
 
792
805
  // drawing images
793
- attribute boolean imageSmoothingEnabled; // (default true)
794
- void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy);
795
- void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy, double dw, double dh);
796
- void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
806
+ void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy);
807
+ void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
808
+ void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
797
809
 
798
810
  // hit regions
799
811
  void addHitRegion(HitRegionOptions options);
812
+ void removeHitRegion(HitRegionOptions options);
800
813
 
801
814
  // pixel manipulation
802
815
  ImageData createImageData(double sw, double sh);
803
816
  ImageData createImageData(ImageData imagedata);
817
+ ImageData createImageDataHD(double sw, double sh);
804
818
  ImageData getImageData(double sx, double sy, double sw, double sh);
819
+ ImageData getImageDataHD(double sx, double sy, double sw, double sh);
805
820
  void putImageData(ImageData imagedata, double dx, double dy);
806
- void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
821
+ void putImageDataHD(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
807
822
  };
808
823
  CanvasRenderingContext2D implements CanvasDrawingStyles;
809
824
  CanvasRenderingContext2D implements CanvasPathMethods;
@@ -811,15 +826,15 @@ CanvasRenderingContext2D implements CanvasPathMethods;
811
826
  [NoInterfaceObject]
812
827
  interface CanvasDrawingStyles {
813
828
  // line caps/joins
814
- attribute double lineWidth; // (default 1)
829
+ attribute unrestricted double lineWidth; // (default 1)
815
830
  attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
816
831
  attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
817
- attribute double miterLimit; // (default 10)
832
+ attribute unrestricted double miterLimit; // (default 10)
818
833
 
819
834
  // dashed lines
820
- void setLineDash(sequence<double> segments); // default empty
821
- sequence<double> getLineDash();
822
- attribute double lineDashOffset;
835
+ void setLineDash(sequence<unrestricted double> segments); // default empty
836
+ sequence<unrestricted double> getLineDash();
837
+ attribute unrestricted double lineDashOffset;
823
838
 
824
839
  // text
825
840
  attribute DOMString font; // (default 10px sans-serif)
@@ -831,20 +846,20 @@ interface CanvasDrawingStyles {
831
846
  interface CanvasPathMethods {
832
847
  // shared path API methods
833
848
  void closePath();
834
- void moveTo(double x, double y);
835
- void lineTo(double x, double y);
836
- void quadraticCurveTo(double cpx, double cpy, double x, double y);
837
- void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
838
- void arcTo(double x1, double y1, double x2, double y2, double radius);
839
- void arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation);
840
- void rect(double x, double y, double w, double h);
841
- void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
842
- void ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, boolean anticlockwise);
849
+ void moveTo(unrestricted double x, unrestricted double y);
850
+ void lineTo(unrestricted double x, unrestricted double y);
851
+ void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y);
852
+ void bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
853
+ void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius);
854
+ void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation);
855
+ void rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
856
+ void arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);
857
+ void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, boolean anticlockwise);
843
858
  };
844
859
 
845
860
  interface CanvasGradient {
846
861
  // opaque object
847
- void addColorStop(double offset, DOMString color);
862
+ void addColorStop(unrestricted double offset, DOMString color);
848
863
  };
849
864
 
850
865
  interface CanvasPattern {
@@ -898,13 +913,17 @@ DrawingStyle implements CanvasDrawingStyles;
898
913
  interface Path {
899
914
  void addPath(Path path, SVGMatrix? transformation);
900
915
  void addPathByStrokingPath(Path path, CanvasDrawingStyles styles, SVGMatrix? transformation);
901
- void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, double x, double y, optional double maxWidth);
902
- void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, double x, double y, optional double maxWidth);
903
- void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path path, optional double maxWidth);
904
- void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path path, optional double maxWidth);
916
+ void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
917
+ void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
918
+ void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path path, optional unrestricted double maxWidth);
919
+ void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path path, optional unrestricted double maxWidth);
905
920
  };
906
921
  Path implements CanvasPathMethods;
907
922
 
923
+ partial interface Screen {
924
+ readonly attribute double canvasResolution;
925
+ };
926
+
908
927
  partial interface MouseEvent {
909
928
  readonly attribute DOMString? region;
910
929
  };
@@ -1079,7 +1098,7 @@ interface HTMLInputElement : HTMLElement {
1079
1098
  attribute DOMString defaultValue;
1080
1099
  attribute DOMString value;
1081
1100
  attribute Date? valueAsDate;
1082
- attribute double valueAsNumber;
1101
+ attribute unrestricted double valueAsNumber;
1083
1102
  attribute unsigned long width;
1084
1103
 
1085
1104
  void stepUp(optional long n);
@@ -1276,7 +1295,6 @@ interface HTMLMeterElement : HTMLElement {
1276
1295
  readonly attribute NodeList labels;
1277
1296
  };
1278
1297
 
1279
-
1280
1298
  enum SelectionMode {
1281
1299
  'select',
1282
1300
  'start',
@@ -1323,18 +1341,15 @@ interface HTMLDialogElement : HTMLElement {
1323
1341
  void close(optional DOMString returnValue);
1324
1342
  };
1325
1343
 
1326
- [ReplaceableNamedProperties]
1344
+ [NamedPropertiesObject]
1327
1345
  interface Window : EventTarget {
1328
1346
  // the current browsing context
1329
1347
  [Unforgeable] readonly attribute WindowProxy window;
1330
1348
  [Replaceable] readonly attribute WindowProxy self;
1331
1349
  [Unforgeable] readonly attribute Document document;
1332
- attribute DOMString name;
1350
+ attribute DOMString name;
1333
1351
  [PutForwards=href, Unforgeable] readonly attribute Location location;
1334
1352
  readonly attribute History history;
1335
-
1336
- boolean find(optional DOMString aString, optional boolean aCaseSensitive, optional boolean aBackwards, optional boolean aWrapAround, optional boolean aWholeWord, optional boolean aSearchInFrames, optional boolean aShowDialog);
1337
-
1338
1353
  [Replaceable] readonly attribute BarProp locationbar;
1339
1354
  [Replaceable] readonly attribute BarProp menubar;
1340
1355
  [Replaceable] readonly attribute BarProp personalbar;
@@ -1359,7 +1374,7 @@ interface Window : EventTarget {
1359
1374
  getter object (DOMString name);
1360
1375
 
1361
1376
  // the user agent
1362
- readonly attribute Navigator navigator;
1377
+ readonly attribute Navigator navigator;
1363
1378
  readonly attribute External external;
1364
1379
  readonly attribute ApplicationCache applicationCache;
1365
1380
 
@@ -1374,74 +1389,74 @@ interface Window : EventTarget {
1374
1389
  void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer);
1375
1390
 
1376
1391
  // event handler IDL attributes
1377
- [TreatNonCallableAsNull] attribute Function? onabort;
1378
- [TreatNonCallableAsNull] attribute Function? onafterprint;
1379
- [TreatNonCallableAsNull] attribute Function? onbeforeprint;
1380
- [TreatNonCallableAsNull] attribute Function? onbeforeunload;
1381
- [TreatNonCallableAsNull] attribute Function? onblur;
1382
- [TreatNonCallableAsNull] attribute Function? oncancel;
1383
- [TreatNonCallableAsNull] attribute Function? oncanplay;
1384
- [TreatNonCallableAsNull] attribute Function? oncanplaythrough;
1385
- [TreatNonCallableAsNull] attribute Function? onchange;
1386
- [TreatNonCallableAsNull] attribute Function? onclick;
1387
- [TreatNonCallableAsNull] attribute Function? onclose;
1388
- [TreatNonCallableAsNull] attribute Function? oncontextmenu;
1389
- [TreatNonCallableAsNull] attribute Function? oncuechange;
1390
- [TreatNonCallableAsNull] attribute Function? ondblclick;
1391
- [TreatNonCallableAsNull] attribute Function? ondrag;
1392
- [TreatNonCallableAsNull] attribute Function? ondragend;
1393
- [TreatNonCallableAsNull] attribute Function? ondragenter;
1394
- [TreatNonCallableAsNull] attribute Function? ondragleave;
1395
- [TreatNonCallableAsNull] attribute Function? ondragover;
1396
- [TreatNonCallableAsNull] attribute Function? ondragstart;
1397
- [TreatNonCallableAsNull] attribute Function? ondrop;
1398
- [TreatNonCallableAsNull] attribute Function? ondurationchange;
1399
- [TreatNonCallableAsNull] attribute Function? onemptied;
1400
- [TreatNonCallableAsNull] attribute Function? onended;
1401
- [TreatNonCallableAsNull] attribute Function? onerror;
1402
- [TreatNonCallableAsNull] attribute Function? onfocus;
1403
- [TreatNonCallableAsNull] attribute Function? onhashchange;
1404
- [TreatNonCallableAsNull] attribute Function? oninput;
1405
- [TreatNonCallableAsNull] attribute Function? oninvalid;
1406
- [TreatNonCallableAsNull] attribute Function? onkeydown;
1407
- [TreatNonCallableAsNull] attribute Function? onkeypress;
1408
- [TreatNonCallableAsNull] attribute Function? onkeyup;
1409
- [TreatNonCallableAsNull] attribute Function? onload;
1410
- [TreatNonCallableAsNull] attribute Function? onloadeddata;
1411
- [TreatNonCallableAsNull] attribute Function? onloadedmetadata;
1412
- [TreatNonCallableAsNull] attribute Function? onloadstart;
1413
- [TreatNonCallableAsNull] attribute Function? onmessage;
1414
- [TreatNonCallableAsNull] attribute Function? onmousedown;
1415
- [TreatNonCallableAsNull] attribute Function? onmousemove;
1416
- [TreatNonCallableAsNull] attribute Function? onmouseout;
1417
- [TreatNonCallableAsNull] attribute Function? onmouseover;
1418
- [TreatNonCallableAsNull] attribute Function? onmouseup;
1419
- [TreatNonCallableAsNull] attribute Function? onmousewheel;
1420
- [TreatNonCallableAsNull] attribute Function? onoffline;
1421
- [TreatNonCallableAsNull] attribute Function? ononline;
1422
- [TreatNonCallableAsNull] attribute Function? onpause;
1423
- [TreatNonCallableAsNull] attribute Function? onplay;
1424
- [TreatNonCallableAsNull] attribute Function? onplaying;
1425
- [TreatNonCallableAsNull] attribute Function? onpagehide;
1426
- [TreatNonCallableAsNull] attribute Function? onpageshow;
1427
- [TreatNonCallableAsNull] attribute Function? onpopstate;
1428
- [TreatNonCallableAsNull] attribute Function? onprogress;
1429
- [TreatNonCallableAsNull] attribute Function? onratechange;
1430
- [TreatNonCallableAsNull] attribute Function? onreset;
1431
- [TreatNonCallableAsNull] attribute Function? onresize;
1432
- [TreatNonCallableAsNull] attribute Function? onscroll;
1433
- [TreatNonCallableAsNull] attribute Function? onseeked;
1434
- [TreatNonCallableAsNull] attribute Function? onseeking;
1435
- [TreatNonCallableAsNull] attribute Function? onselect;
1436
- [TreatNonCallableAsNull] attribute Function? onshow;
1437
- [TreatNonCallableAsNull] attribute Function? onstalled;
1438
- [TreatNonCallableAsNull] attribute Function? onstorage;
1439
- [TreatNonCallableAsNull] attribute Function? onsubmit;
1440
- [TreatNonCallableAsNull] attribute Function? onsuspend;
1441
- [TreatNonCallableAsNull] attribute Function? ontimeupdate;
1442
- [TreatNonCallableAsNull] attribute Function? onunload;
1443
- [TreatNonCallableAsNull] attribute Function? onvolumechange;
1444
- [TreatNonCallableAsNull] attribute Function? onwaiting;
1392
+ attribute EventHandler onabort;
1393
+ attribute EventHandler onafterprint;
1394
+ attribute EventHandler onbeforeprint;
1395
+ attribute EventHandler onbeforeunload;
1396
+ attribute EventHandler onblur;
1397
+ attribute EventHandler oncancel;
1398
+ attribute EventHandler oncanplay;
1399
+ attribute EventHandler oncanplaythrough;
1400
+ attribute EventHandler onchange;
1401
+ attribute EventHandler onclick;
1402
+ attribute EventHandler onclose;
1403
+ attribute EventHandler oncontextmenu;
1404
+ attribute EventHandler oncuechange;
1405
+ attribute EventHandler ondblclick;
1406
+ attribute EventHandler ondrag;
1407
+ attribute EventHandler ondragend;
1408
+ attribute EventHandler ondragenter;
1409
+ attribute EventHandler ondragleave;
1410
+ attribute EventHandler ondragover;
1411
+ attribute EventHandler ondragstart;
1412
+ attribute EventHandler ondrop;
1413
+ attribute EventHandler ondurationchange;
1414
+ attribute EventHandler onemptied;
1415
+ attribute EventHandler onended;
1416
+ attribute OnErrorEventHandler onerror;
1417
+ attribute EventHandler onfocus;
1418
+ attribute EventHandler onhashchange;
1419
+ attribute EventHandler oninput;
1420
+ attribute EventHandler oninvalid;
1421
+ attribute EventHandler onkeydown;
1422
+ attribute EventHandler onkeypress;
1423
+ attribute EventHandler onkeyup;
1424
+ attribute EventHandler onload;
1425
+ attribute EventHandler onloadeddata;
1426
+ attribute EventHandler onloadedmetadata;
1427
+ attribute EventHandler onloadstart;
1428
+ attribute EventHandler onmessage;
1429
+ attribute EventHandler onmousedown;
1430
+ attribute EventHandler onmousemove;
1431
+ attribute EventHandler onmouseout;
1432
+ attribute EventHandler onmouseover;
1433
+ attribute EventHandler onmouseup;
1434
+ attribute EventHandler onmousewheel;
1435
+ attribute EventHandler onoffline;
1436
+ attribute EventHandler ononline;
1437
+ attribute EventHandler onpause;
1438
+ attribute EventHandler onplay;
1439
+ attribute EventHandler onplaying;
1440
+ attribute EventHandler onpagehide;
1441
+ attribute EventHandler onpageshow;
1442
+ attribute EventHandler onpopstate;
1443
+ attribute EventHandler onprogress;
1444
+ attribute EventHandler onratechange;
1445
+ attribute EventHandler onreset;
1446
+ attribute EventHandler onresize;
1447
+ attribute EventHandler onscroll;
1448
+ attribute EventHandler onseeked;
1449
+ attribute EventHandler onseeking;
1450
+ attribute EventHandler onselect;
1451
+ attribute EventHandler onshow;
1452
+ attribute EventHandler onstalled;
1453
+ attribute EventHandler onstorage;
1454
+ attribute EventHandler onsubmit;
1455
+ attribute EventHandler onsuspend;
1456
+ attribute EventHandler ontimeupdate;
1457
+ attribute EventHandler onunload;
1458
+ attribute EventHandler onvolumechange;
1459
+ attribute EventHandler onwaiting;
1445
1460
  };
1446
1461
 
1447
1462
  interface BarProp {
@@ -1464,7 +1479,7 @@ interface Location {
1464
1479
  void replace(DOMString url);
1465
1480
  void reload();
1466
1481
 
1467
- // URL decomposition IDL attributes
1482
+ // URL decomposition IDL attributes
1468
1483
  attribute DOMString protocol;
1469
1484
  attribute DOMString host;
1470
1485
  attribute DOMString hostname;
@@ -1524,14 +1539,14 @@ interface ApplicationCache : EventTarget {
1524
1539
  void swapCache();
1525
1540
 
1526
1541
  // events
1527
- [TreatNonCallableAsNull] attribute Function? onchecking;
1528
- [TreatNonCallableAsNull] attribute Function? onerror;
1529
- [TreatNonCallableAsNull] attribute Function? onnoupdate;
1530
- [TreatNonCallableAsNull] attribute Function? ondownloading;
1531
- [TreatNonCallableAsNull] attribute Function? onprogress;
1532
- [TreatNonCallableAsNull] attribute Function? onupdateready;
1533
- [TreatNonCallableAsNull] attribute Function? oncached;
1534
- [TreatNonCallableAsNull] attribute Function? onobsolete;
1542
+ attribute EventHandler onchecking;
1543
+ attribute EventHandler onerror;
1544
+ attribute EventHandler onnoupdate;
1545
+ attribute EventHandler ondownloading;
1546
+ attribute EventHandler onprogress;
1547
+ attribute EventHandler onupdateready;
1548
+ attribute EventHandler oncached;
1549
+ attribute EventHandler onobsolete;
1535
1550
  };
1536
1551
 
1537
1552
  [NoInterfaceObject]
@@ -1539,10 +1554,13 @@ interface NavigatorOnLine {
1539
1554
  readonly attribute boolean onLine;
1540
1555
  };
1541
1556
 
1542
- [Callback=FunctionOnly, NoInterfaceObject]
1543
- interface Function {
1544
- any call(any... arguments);
1545
- };
1557
+ [TreatNonCallableAsNull]
1558
+ callback EventHandlerNonNull = any (Event event);
1559
+ typedef EventHandlerNonNull? EventHandler;
1560
+
1561
+ [TreatNonCallableAsNull]
1562
+ callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, DOMString source, unsigned long lineno, unsigned long column);
1563
+ typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
1546
1564
 
1547
1565
  [NoInterfaceObject]
1548
1566
  interface WindowBase64 {
@@ -1553,15 +1571,17 @@ Window implements WindowBase64;
1553
1571
 
1554
1572
  [NoInterfaceObject]
1555
1573
  interface WindowTimers {
1556
- long setTimeout(Function handler, optional long timeout, any... args);
1574
+ long setTimeout(ArbitraryCallback handler, optional long timeout, any... args);
1557
1575
  long setTimeout([AllowAny] DOMString handler, optional long timeout, any... args);
1558
1576
  void clearTimeout(long handle);
1559
- long setInterval(Function handler, optional long timeout, any... args);
1577
+ long setInterval(ArbitraryCallback handler, optional long timeout, any... args);
1560
1578
  long setInterval([AllowAny] DOMString handler, optional long timeout, any... args);
1561
1579
  void clearInterval(long handle);
1562
1580
  };
1563
1581
  Window implements WindowTimers;
1564
1582
 
1583
+ [TreatNonCallableAsNull] callback ArbitraryCallback = any (any... args);
1584
+
1565
1585
  [NoInterfaceObject] interface WindowModal {
1566
1586
  readonly attribute any dialogArguments;
1567
1587
  attribute DOMString returnValue;
@@ -1614,7 +1634,7 @@ interface DataTransfer {
1614
1634
  void addElement(Element element);
1615
1635
 
1616
1636
  /* old interface */
1617
- readonly attribute DOMStringList types;
1637
+ readonly attribute DOMString[] types;
1618
1638
  DOMString getData(DOMString format);
1619
1639
  void setData(DOMString format, DOMString data);
1620
1640
  void clearData(optional DOMString format);
@@ -1657,21 +1677,21 @@ interface WorkerGlobalScope : EventTarget {
1657
1677
  readonly attribute WorkerLocation location;
1658
1678
 
1659
1679
  void close();
1660
- [TreatNonCallableAsNull] attribute Function? onerror;
1661
- [TreatNonCallableAsNull] attribute Function? onoffline;
1662
- [TreatNonCallableAsNull] attribute Function? ononline;
1680
+ attribute EventHandler onerror;
1681
+ attribute EventHandler onoffline;
1682
+ attribute EventHandler ononline;
1663
1683
  };
1664
1684
  WorkerGlobalScope implements WorkerUtils;
1665
1685
 
1666
1686
  interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
1667
1687
  void postMessage(any message, optional sequence<Transferable> transfer);
1668
- [TreatNonCallableAsNull] attribute Function? onmessage;
1688
+ attribute EventHandler onmessage;
1669
1689
  };
1670
1690
 
1671
1691
  interface SharedWorkerGlobalScope : WorkerGlobalScope {
1672
1692
  readonly attribute DOMString name;
1673
1693
  readonly attribute ApplicationCache applicationCache;
1674
- [TreatNonCallableAsNull] attribute Function? onconnect;
1694
+ attribute EventHandler onconnect;
1675
1695
  };
1676
1696
 
1677
1697
  [Constructor(DOMString type, optional ErrorEventInit eventInitDict)]
@@ -1689,7 +1709,7 @@ dictionary ErrorEventInit : EventInit {
1689
1709
 
1690
1710
  [NoInterfaceObject]
1691
1711
  interface AbstractWorker {
1692
- [TreatNonCallableAsNull] attribute Function? onerror;
1712
+ attribute EventHandler onerror;
1693
1713
 
1694
1714
  };
1695
1715
 
@@ -1698,7 +1718,7 @@ interface Worker : EventTarget {
1698
1718
  void terminate();
1699
1719
 
1700
1720
  void postMessage(any message, optional sequence<Transferable> transfer);
1701
- [TreatNonCallableAsNull] attribute Function? onmessage;
1721
+ attribute EventHandler onmessage;
1702
1722
  };
1703
1723
  Worker implements AbstractWorker;
1704
1724
 
@@ -1737,7 +1757,7 @@ interface MessageEvent : Event {
1737
1757
  readonly attribute any data;
1738
1758
  readonly attribute DOMString origin;
1739
1759
  readonly attribute DOMString lastEventId;
1740
- readonly attribute WindowProxy? source;
1760
+ readonly attribute (WindowProxy or MessagePort)? source;
1741
1761
  readonly attribute MessagePort[]? ports;
1742
1762
  };
1743
1763
 
@@ -1761,9 +1781,9 @@ interface EventSource : EventTarget {
1761
1781
  readonly attribute unsigned short readyState;
1762
1782
 
1763
1783
  // networking
1764
- [TreatNonCallableAsNull] attribute Function? onopen;
1765
- [TreatNonCallableAsNull] attribute Function? onmessage;
1766
- [TreatNonCallableAsNull] attribute Function? onerror;
1784
+ attribute EventHandler onopen;
1785
+ attribute EventHandler onmessage;
1786
+ attribute EventHandler onerror;
1767
1787
  void close();
1768
1788
  };
1769
1789
 
@@ -1784,18 +1804,18 @@ interface WebSocket : EventTarget {
1784
1804
  readonly attribute unsigned long bufferedAmount;
1785
1805
 
1786
1806
  // networking
1787
- [TreatNonCallableAsNull] attribute Function? onopen;
1788
- [TreatNonCallableAsNull] attribute Function? onerror;
1789
- [TreatNonCallableAsNull] attribute Function? onclose;
1807
+ attribute EventHandler onopen;
1808
+ attribute EventHandler onerror;
1809
+ attribute EventHandler onclose;
1790
1810
  readonly attribute DOMString extensions;
1791
1811
  readonly attribute DOMString protocol;
1792
1812
  void close([Clamp] optional unsigned short code, optional DOMString reason);
1793
1813
 
1794
1814
  // messaging
1795
- [TreatNonCallableAsNull] attribute Function? onmessage;
1815
+ attribute EventHandler onmessage;
1796
1816
  attribute DOMString binaryType;
1797
1817
  void send(DOMString data);
1798
- void send(ArrayBuffer data);
1818
+ void send(ArrayBufferView data);
1799
1819
  void send(Blob data);
1800
1820
  };
1801
1821
 
@@ -1824,7 +1844,7 @@ interface MessagePort : EventTarget {
1824
1844
  void close();
1825
1845
 
1826
1846
  // event handlers
1827
- [TreatNonCallableAsNull] attribute Function? onmessage;
1847
+ attribute EventHandler onmessage;
1828
1848
  };
1829
1849
  MessagePort implements Transferable;
1830
1850
 
@@ -1875,7 +1895,7 @@ interface HTMLAppletElement : HTMLElement {
1875
1895
  attribute DOMString height;
1876
1896
  attribute unsigned long hspace;
1877
1897
  attribute DOMString name;
1878
- attribute DOMString _object; // the underscore is not part of the identifier
1898
+ attribute DOMString _object; // the underscore is not part of the identifier
1879
1899
  attribute unsigned long vspace;
1880
1900
  attribute DOMString width;
1881
1901
  };
@@ -1893,9 +1913,9 @@ interface HTMLMarqueeElement : HTMLElement {
1893
1913
  attribute unsigned long vspace;
1894
1914
  attribute DOMString width;
1895
1915
 
1896
- [TreatNonCallableAsNull] attribute Function? onbounce;
1897
- [TreatNonCallableAsNull] attribute Function? onfinish;
1898
- [TreatNonCallableAsNull] attribute Function? onstart;
1916
+ attribute EventHandler onbounce;
1917
+ attribute EventHandler onfinish;
1918
+ attribute EventHandler onstart;
1899
1919
 
1900
1920
  void start();
1901
1921
  void stop();
@@ -1904,24 +1924,24 @@ interface HTMLMarqueeElement : HTMLElement {
1904
1924
  interface HTMLFrameSetElement : HTMLElement {
1905
1925
  attribute DOMString cols;
1906
1926
  attribute DOMString rows;
1907
- [TreatNonCallableAsNull] attribute Function? onafterprint;
1908
- [TreatNonCallableAsNull] attribute Function? onbeforeprint;
1909
- [TreatNonCallableAsNull] attribute Function? onbeforeunload;
1910
- [TreatNonCallableAsNull] attribute Function? onblur;
1911
- [TreatNonCallableAsNull] attribute Function? onerror;
1912
- [TreatNonCallableAsNull] attribute Function? onfocus;
1913
- [TreatNonCallableAsNull] attribute Function? onhashchange;
1914
- [TreatNonCallableAsNull] attribute Function? onload;
1915
- [TreatNonCallableAsNull] attribute Function? onmessage;
1916
- [TreatNonCallableAsNull] attribute Function? onoffline;
1917
- [TreatNonCallableAsNull] attribute Function? ononline;
1918
- [TreatNonCallableAsNull] attribute Function? onpagehide;
1919
- [TreatNonCallableAsNull] attribute Function? onpageshow;
1920
- [TreatNonCallableAsNull] attribute Function? onpopstate;
1921
- [TreatNonCallableAsNull] attribute Function? onresize;
1922
- [TreatNonCallableAsNull] attribute Function? onscroll;
1923
- [TreatNonCallableAsNull] attribute Function? onstorage;
1924
- [TreatNonCallableAsNull] attribute Function? onunload;
1927
+ attribute EventHandler onafterprint;
1928
+ attribute EventHandler onbeforeprint;
1929
+ attribute EventHandler onbeforeunload;
1930
+ attribute EventHandler onblur;
1931
+ attribute EventHandler onerror;
1932
+ attribute EventHandler onfocus;
1933
+ attribute EventHandler onhashchange;
1934
+ attribute EventHandler onload;
1935
+ attribute EventHandler onmessage;
1936
+ attribute EventHandler onoffline;
1937
+ attribute EventHandler ononline;
1938
+ attribute EventHandler onpagehide;
1939
+ attribute EventHandler onpageshow;
1940
+ attribute EventHandler onpopstate;
1941
+ attribute EventHandler onresize;
1942
+ attribute EventHandler onscroll;
1943
+ attribute EventHandler onstorage;
1944
+ attribute EventHandler onunload;
1925
1945
  };
1926
1946
 
1927
1947
  interface HTMLFrameElement : HTMLElement {
@@ -1953,7 +1973,7 @@ partial interface HTMLAreaElement {
1953
1973
  interface HTMLBaseFontElement : HTMLElement {
1954
1974
  attribute DOMString color;
1955
1975
  attribute DOMString face;
1956
- attribute long size;
1976
+ attribute long size;
1957
1977
  };
1958
1978
 
1959
1979
  partial interface HTMLBodyElement {
@@ -2001,7 +2021,7 @@ partial interface HTMLEmbedElement {
2001
2021
  interface HTMLFontElement : HTMLElement {
2002
2022
  [TreatNullAs=EmptyString] attribute DOMString color;
2003
2023
  attribute DOMString face;
2004
- attribute DOMString size;
2024
+ attribute DOMString size;
2005
2025
  };
2006
2026
 
2007
2027
  partial interface HTMLHeadingElement {