webidl 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -1
- data/.travis.yml +4 -3
- data/LICENSE +1 -1
- data/README.md +3 -1
- data/lib/webidl/ast/node.rb +3 -1
- data/lib/webidl/ast/operation.rb +1 -1
- data/lib/webidl/generator/ruby_sexp_visitor.rb +60 -4
- data/lib/webidl/parse_tree/dictionary_member.rb +3 -3
- data/lib/webidl/parse_tree/dictionary_members.rb +1 -1
- data/lib/webidl/version.rb +2 -2
- data/spec/ast_spec.rb +15 -0
- data/spec/fixtures/dictionary.idl +4 -0
- data/spec/fixtures/html5.idl +902 -821
- data/spec/parser_spec.rb +0 -1
- data/spec/spec_helper.rb +8 -2
- data/webidl.gemspec +2 -0
- metadata +35 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: df778b601ca64c1cb82bc45c9a43a6e420b194a5
|
4
|
+
data.tar.gz: 787c438e411b397c7c5437bcf4f195ae8ed32c53
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d0712ece7ffdff6ba7be62e2b97242786c9c69fabf5103b063a2c8e28bfdc0656d86dca15fa6415f244dc6587fc4dceb0fb9bc7216d620167b713c83b0ea7200
|
7
|
+
data.tar.gz: 29b9ba6d2cc81e0e9b43606a01090a5a50fa284f092fe9e3351b9625f78d59f638bc6ae5ac8b41143ba2eaee01bd944d9a15d135b3775fe492b9b9ab7e996e73
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,8 @@ webidl
|
|
4
4
|
This gem provides a pure-ruby parser and code generator for Web IDL, an interface description language for interfaces intended to be implemented in web browsers.
|
5
5
|
|
6
6
|
[![Build Status](https://secure.travis-ci.org/jarib/webidl.png)](http://travis-ci.org/jarib/webidl)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/jarib/webidl/badge.png)](https://coveralls.io/r/jarib/webidl)
|
8
|
+
[![Code Climate](https://codeclimate.com/github/jarib/webidl.png)](https://codeclimate.com/github/jarib/webidl)
|
7
9
|
|
8
10
|
Problems
|
9
11
|
--------
|
@@ -39,4 +41,4 @@ Note on Patches/Pull Requests
|
|
39
41
|
Copyright
|
40
42
|
---------
|
41
43
|
|
42
|
-
Copyright (c) 2009-
|
44
|
+
Copyright (c) 2009-2014 Jari Bakken. See LICENSE for details.
|
data/lib/webidl/ast/node.rb
CHANGED
data/lib/webidl/ast/operation.rb
CHANGED
@@ -20,6 +20,15 @@ module WebIDL
|
|
20
20
|
].compact
|
21
21
|
end
|
22
22
|
|
23
|
+
def visit_dictionary(dict)
|
24
|
+
[:module, classify(dict.name),
|
25
|
+
([:scope, [:block] + dict.inherits.map { |inherit| [:call, nil, :include, [:arglist, inherit.accept(self)]] }] unless dict.inherits.empty?),
|
26
|
+
[:scope,
|
27
|
+
[:block] + dict.members.map { |m| m.accept(self) }
|
28
|
+
]
|
29
|
+
].compact
|
30
|
+
end
|
31
|
+
|
23
32
|
def visit_exception(ex)
|
24
33
|
[:class, classify(ex.name), [:const, :StandardError],
|
25
34
|
[:scope,
|
@@ -32,13 +41,38 @@ module WebIDL
|
|
32
41
|
[:cdecl, const.name, [:lit, const.value]] # FIXME: won't always be literals - need Literal AST node?
|
33
42
|
end
|
34
43
|
|
44
|
+
def visit_enum(enum)
|
45
|
+
[:cdecl, enum.name, [:lit, enum.values]]
|
46
|
+
end
|
47
|
+
|
35
48
|
def visit_field(field)
|
36
49
|
[:call, nil, :attr_accessor, [:arglist, [:lit, field.name.to_sym]]]
|
37
50
|
end
|
38
51
|
|
39
52
|
def visit_attribute(attribute)
|
40
53
|
func = attribute.readonly? ? :attr_reader : :attr_accessor
|
41
|
-
[:call, nil, func, [:arglist, [:lit, attribute.name.
|
54
|
+
[:call, nil, func, [:arglist, [:lit, attrify(attribute.name).to_sym]]]
|
55
|
+
end
|
56
|
+
|
57
|
+
def visit_dictionary_member(mem)
|
58
|
+
[:call, nil, :attr_accessor, [:arglist, [:lit, attrify(mem.name).to_sym]]]
|
59
|
+
end
|
60
|
+
|
61
|
+
def visit_callback(callback)
|
62
|
+
arguments = callback.arguments.map { |a| [:lit, attrify(a.name).to_sym] }
|
63
|
+
|
64
|
+
[:defn, callback.name,
|
65
|
+
[:args] + callback.arguments.map { |a| a.accept(self) },
|
66
|
+
[:scope,
|
67
|
+
[:block,
|
68
|
+
[:call, nil, :raise,
|
69
|
+
[:arglist,
|
70
|
+
[:const, :NotImplementedError]
|
71
|
+
]
|
72
|
+
]
|
73
|
+
]
|
74
|
+
]
|
75
|
+
]
|
42
76
|
end
|
43
77
|
|
44
78
|
def visit_operation(operation)
|
@@ -53,11 +87,13 @@ module WebIDL
|
|
53
87
|
meth = :to_s
|
54
88
|
elsif operation.deleter?
|
55
89
|
meth = :delete!
|
90
|
+
elsif operation.legacycaller?
|
91
|
+
meth = operation.parent.name
|
56
92
|
else
|
57
|
-
raise "no name for operation #{operation.
|
93
|
+
raise "no name for operation #{operation.inspect}"
|
58
94
|
end
|
59
95
|
else
|
60
|
-
meth = operation.name
|
96
|
+
meth = attrify(operation.name)
|
61
97
|
meth << "=" if operation.setter?
|
62
98
|
end
|
63
99
|
|
@@ -76,7 +112,7 @@ module WebIDL
|
|
76
112
|
end
|
77
113
|
|
78
114
|
def visit_argument(argument)
|
79
|
-
name = argument.name
|
115
|
+
name = attrify(argument.name)
|
80
116
|
arg = argument.variadic? ? "*#{name}" : name
|
81
117
|
|
82
118
|
arg.to_sym
|
@@ -114,5 +150,25 @@ module WebIDL
|
|
114
150
|
end
|
115
151
|
end
|
116
152
|
|
153
|
+
RESERVED = %w[
|
154
|
+
BEGIN do next then
|
155
|
+
END else nil true
|
156
|
+
alias elsif not undef
|
157
|
+
and end or unless
|
158
|
+
begin ensure redo until
|
159
|
+
break false rescue when
|
160
|
+
case for retry while
|
161
|
+
class if return while
|
162
|
+
def in self __FILE__
|
163
|
+
defined? module super __LINE__
|
164
|
+
]
|
165
|
+
|
166
|
+
def attrify(string)
|
167
|
+
attr = string.snake_case
|
168
|
+
attr += '_' if RESERVED.include?(attr)
|
169
|
+
|
170
|
+
attr
|
171
|
+
end
|
172
|
+
|
117
173
|
end # RubySexpVisitor
|
118
174
|
end # WebIDL
|
@@ -3,14 +3,14 @@ module WebIDL
|
|
3
3
|
class DictionaryMember < Treetop::Runtime::SyntaxNode
|
4
4
|
|
5
5
|
def build(parent)
|
6
|
-
|
6
|
+
raise unless default.empty? or default.respond_to?(:build)
|
7
7
|
|
8
8
|
dm = Ast::DictionaryMember.new parent,
|
9
9
|
type.build(parent),
|
10
10
|
name.build,
|
11
|
-
default.build unless default.empty?
|
11
|
+
(default.build unless default.empty?)
|
12
12
|
end
|
13
13
|
|
14
14
|
end # Attribute
|
15
15
|
end # ParseTree
|
16
|
-
end # WebIDL
|
16
|
+
end # WebIDL
|
data/lib/webidl/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module WebIDL
|
2
|
-
VERSION = "0.1.
|
3
|
-
end
|
2
|
+
VERSION = "0.1.6"
|
3
|
+
end
|
data/spec/ast_spec.rb
CHANGED
@@ -217,6 +217,21 @@ describe WebIDL::Ast do
|
|
217
217
|
impls.implementee.should == "::baz"
|
218
218
|
end
|
219
219
|
|
220
|
+
it 'creates a dictionary' do
|
221
|
+
definitions = parse(fixture("dictionary.idl")).build
|
222
|
+
dict = definitions.first
|
223
|
+
|
224
|
+
dict.should be_kind_of(WebIDL::Ast::Dictionary)
|
225
|
+
dict.name.should == "HashChangeEventInit"
|
226
|
+
|
227
|
+
dict.inherits.size.should == 1
|
228
|
+
dict.inherits.first.name.should == "EventInit"
|
229
|
+
|
230
|
+
dict.members.size.should == 2
|
231
|
+
dict.members.map(&:name).should == %w[oldURL newURL]
|
232
|
+
dict.members.map { |e| e.type.name }.should == [:DOMString, :DOMString]
|
233
|
+
end
|
234
|
+
|
220
235
|
it "builds an AST from the HTML5 spec" do
|
221
236
|
parse(fixture("html5.idl")).build
|
222
237
|
end
|
data/spec/fixtures/html5.idl
CHANGED
@@ -2,16 +2,22 @@ interface Example {
|
|
2
2
|
// this is an IDL definition
|
3
3
|
};
|
4
4
|
|
5
|
+
typedef (Int8Array or Uint8Array or Uint8ClampedArray or
|
6
|
+
Int16Array or Uint16Array or
|
7
|
+
Int32Array or Uint32Array or
|
8
|
+
Float32Array or Float64Array or
|
9
|
+
DataView) ArrayBufferView;
|
10
|
+
|
5
11
|
interface HTMLAllCollection : HTMLCollection {
|
6
|
-
// inherits length and
|
7
|
-
|
8
|
-
|
9
|
-
|
12
|
+
// inherits length and 'getter'
|
13
|
+
Element? item(unsigned long index);
|
14
|
+
(HTMLCollection or Element)? item(DOMString name);
|
15
|
+
legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
10
16
|
};
|
11
17
|
|
12
18
|
interface HTMLFormControlsCollection : HTMLCollection {
|
13
19
|
// inherits length and item()
|
14
|
-
legacycaller getter
|
20
|
+
legacycaller getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
15
21
|
};
|
16
22
|
|
17
23
|
interface RadioNodeList : NodeList {
|
@@ -20,9 +26,9 @@ interface RadioNodeList : NodeList {
|
|
20
26
|
|
21
27
|
interface HTMLOptionsCollection : HTMLCollection {
|
22
28
|
// inherits item()
|
23
|
-
attribute unsigned long length; //
|
24
|
-
legacycaller
|
25
|
-
setter creator void (unsigned long index, HTMLOptionElement option);
|
29
|
+
attribute unsigned long length; // shadows inherited length
|
30
|
+
legacycaller HTMLOptionElement? (DOMString name);
|
31
|
+
setter creator void (unsigned long index, HTMLOptionElement? option);
|
26
32
|
void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
|
27
33
|
void remove(long index);
|
28
34
|
attribute long selectedIndex;
|
@@ -30,7 +36,7 @@ interface HTMLOptionsCollection : HTMLCollection {
|
|
30
36
|
|
31
37
|
interface HTMLPropertiesCollection : HTMLCollection {
|
32
38
|
// inherits length and item()
|
33
|
-
|
39
|
+
getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem()
|
34
40
|
readonly attribute DOMString[] names;
|
35
41
|
};
|
36
42
|
|
@@ -40,32 +46,34 @@ interface PropertyNodeList : NodeList {
|
|
40
46
|
PropertyValueArray getValues();
|
41
47
|
};
|
42
48
|
|
49
|
+
[OverrideBuiltins, Exposed=Window,Worker]
|
43
50
|
interface DOMStringMap {
|
44
51
|
getter DOMString (DOMString name);
|
45
|
-
setter void (DOMString name, DOMString value);
|
46
|
-
creator void (DOMString name, DOMString value);
|
52
|
+
setter creator void (DOMString name, DOMString value);
|
47
53
|
deleter void (DOMString name);
|
48
54
|
};
|
49
55
|
|
50
56
|
interface DOMElementMap {
|
51
57
|
getter Element (DOMString name);
|
52
|
-
setter void (DOMString name, Element value);
|
53
|
-
creator void (DOMString name, Element value);
|
58
|
+
setter creator void (DOMString name, Element value);
|
54
59
|
deleter void (DOMString name);
|
55
60
|
};
|
56
61
|
|
57
|
-
|
58
|
-
|
62
|
+
typedef (ArrayBuffer or CanvasProxy or MessagePort) Transferable;
|
63
|
+
|
64
|
+
callback FileCallback = void (File file);
|
65
|
+
|
66
|
+
enum DocumentReadyState { "loading", "interactive", "complete" };
|
59
67
|
|
60
68
|
[OverrideBuiltins]
|
61
|
-
partial interface Document {
|
69
|
+
partial /*sealed*/ interface Document {
|
62
70
|
// resource metadata management
|
63
|
-
[PutForwards=href] readonly attribute Location? location;
|
71
|
+
[PutForwards=href, Unforgeable] readonly attribute Location? location;
|
64
72
|
attribute DOMString domain;
|
65
73
|
readonly attribute DOMString referrer;
|
66
74
|
attribute DOMString cookie;
|
67
75
|
readonly attribute DOMString lastModified;
|
68
|
-
readonly attribute
|
76
|
+
readonly attribute DocumentReadyState readyState;
|
69
77
|
|
70
78
|
// DOM tree accessors
|
71
79
|
getter object (DOMString name);
|
@@ -80,12 +88,13 @@ partial interface Document {
|
|
80
88
|
readonly attribute HTMLCollection forms;
|
81
89
|
readonly attribute HTMLCollection scripts;
|
82
90
|
NodeList getElementsByName(DOMString elementName);
|
83
|
-
NodeList getItems(optional DOMString typeNames); // microdata
|
91
|
+
NodeList getItems(optional DOMString typeNames = ""); // microdata
|
84
92
|
readonly attribute DOMElementMap cssElementMap;
|
93
|
+
readonly attribute HTMLScriptElement? currentScript;
|
85
94
|
|
86
95
|
// dynamic markup insertion
|
87
|
-
Document open(optional DOMString type, optional DOMString replace);
|
88
|
-
WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace);
|
96
|
+
Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
97
|
+
WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
|
89
98
|
void close();
|
90
99
|
void write(DOMString... text);
|
91
100
|
void writeln(DOMString... text);
|
@@ -95,9 +104,7 @@ partial interface Document {
|
|
95
104
|
readonly attribute Element? activeElement;
|
96
105
|
boolean hasFocus();
|
97
106
|
attribute DOMString designMode;
|
98
|
-
boolean execCommand(DOMString commandId);
|
99
|
-
boolean execCommand(DOMString commandId, boolean showUI);
|
100
|
-
boolean execCommand(DOMString commandId, boolean showUI, DOMString value);
|
107
|
+
boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
|
101
108
|
boolean queryCommandEnabled(DOMString commandId);
|
102
109
|
boolean queryCommandIndeterm(DOMString commandId);
|
103
110
|
boolean queryCommandState(DOMString commandId);
|
@@ -105,66 +112,12 @@ partial interface Document {
|
|
105
112
|
DOMString queryCommandValue(DOMString commandId);
|
106
113
|
readonly attribute HTMLCollection commands;
|
107
114
|
|
108
|
-
// event handler IDL attributes
|
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;
|
164
|
-
|
165
115
|
// special event handler IDL attributes that only apply to Document objects
|
166
116
|
[LenientThis] attribute EventHandler onreadystatechange;
|
117
|
+
|
118
|
+
// also has obsolete members
|
167
119
|
};
|
120
|
+
Document implements GlobalEventHandlers;
|
168
121
|
|
169
122
|
partial interface XMLDocument {
|
170
123
|
boolean load(DOMString url);
|
@@ -178,14 +131,14 @@ interface HTMLElement : Element {
|
|
178
131
|
attribute DOMString dir;
|
179
132
|
readonly attribute DOMStringMap dataset;
|
180
133
|
|
181
|
-
// microdata
|
134
|
+
// microdata
|
182
135
|
attribute boolean itemScope;
|
183
136
|
[PutForwards=value] readonly attribute DOMSettableTokenList itemType;
|
184
137
|
attribute DOMString itemId;
|
185
138
|
[PutForwards=value] readonly attribute DOMSettableTokenList itemRef;
|
186
139
|
[PutForwards=value] readonly attribute DOMSettableTokenList itemProp;
|
187
140
|
readonly attribute HTMLPropertiesCollection properties;
|
188
|
-
attribute any itemValue;
|
141
|
+
attribute any itemValue; // acts as DOMString on setting
|
189
142
|
|
190
143
|
// user interaction
|
191
144
|
attribute boolean hidden;
|
@@ -201,6 +154,7 @@ interface HTMLElement : Element {
|
|
201
154
|
readonly attribute boolean isContentEditable;
|
202
155
|
attribute HTMLMenuElement? contextMenu;
|
203
156
|
attribute boolean spellcheck;
|
157
|
+
void forceSpellCheck();
|
204
158
|
|
205
159
|
// command API
|
206
160
|
readonly attribute DOMString? commandType;
|
@@ -209,71 +163,14 @@ interface HTMLElement : Element {
|
|
209
163
|
readonly attribute boolean? commandHidden;
|
210
164
|
readonly attribute boolean? commandDisabled;
|
211
165
|
readonly attribute boolean? commandChecked;
|
212
|
-
|
213
|
-
// styling
|
214
|
-
readonly attribute CSSStyleDeclaration style;
|
215
|
-
|
216
|
-
// event handler IDL attributes
|
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;
|
272
166
|
};
|
167
|
+
HTMLElement implements GlobalEventHandlers;
|
273
168
|
|
274
169
|
interface HTMLUnknownElement : HTMLElement { };
|
275
170
|
|
276
|
-
interface HTMLHtmlElement : HTMLElement {
|
171
|
+
interface HTMLHtmlElement : HTMLElement {
|
172
|
+
// also has obsolete members
|
173
|
+
};
|
277
174
|
|
278
175
|
interface HTMLHeadElement : HTMLElement {};
|
279
176
|
|
@@ -287,14 +184,16 @@ interface HTMLBaseElement : HTMLElement {
|
|
287
184
|
};
|
288
185
|
|
289
186
|
interface HTMLLinkElement : HTMLElement {
|
290
|
-
attribute boolean disabled;
|
291
187
|
attribute DOMString href;
|
188
|
+
attribute DOMString crossOrigin;
|
292
189
|
attribute DOMString rel;
|
293
190
|
readonly attribute DOMTokenList relList;
|
294
191
|
attribute DOMString media;
|
295
192
|
attribute DOMString hreflang;
|
296
193
|
attribute DOMString type;
|
297
194
|
[PutForwards=value] readonly attribute DOMSettableTokenList sizes;
|
195
|
+
|
196
|
+
// also has obsolete members
|
298
197
|
};
|
299
198
|
HTMLLinkElement implements LinkStyle;
|
300
199
|
|
@@ -302,53 +201,38 @@ interface HTMLMetaElement : HTMLElement {
|
|
302
201
|
attribute DOMString name;
|
303
202
|
attribute DOMString httpEquiv;
|
304
203
|
attribute DOMString content;
|
204
|
+
|
205
|
+
// also has obsolete members
|
305
206
|
};
|
306
207
|
|
307
208
|
interface HTMLStyleElement : HTMLElement {
|
308
|
-
attribute boolean disabled;
|
309
209
|
attribute DOMString media;
|
310
210
|
attribute DOMString type;
|
311
211
|
attribute boolean scoped;
|
312
212
|
};
|
313
213
|
HTMLStyleElement implements LinkStyle;
|
314
214
|
|
315
|
-
interface HTMLScriptElement : HTMLElement {
|
316
|
-
attribute DOMString src;
|
317
|
-
attribute boolean async;
|
318
|
-
attribute boolean defer;
|
319
|
-
attribute DOMString type;
|
320
|
-
attribute DOMString charset;
|
321
|
-
attribute DOMString text;
|
322
|
-
};
|
323
|
-
|
324
215
|
interface HTMLBodyElement : HTMLElement {
|
325
|
-
|
326
|
-
|
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;
|
216
|
+
|
217
|
+
// also has obsolete members
|
343
218
|
};
|
219
|
+
HTMLBodyElement implements WindowEventHandlers;
|
344
220
|
|
345
|
-
interface HTMLHeadingElement : HTMLElement {
|
221
|
+
interface HTMLHeadingElement : HTMLElement {
|
222
|
+
// also has obsolete members
|
223
|
+
};
|
346
224
|
|
347
|
-
interface HTMLParagraphElement : HTMLElement {
|
225
|
+
interface HTMLParagraphElement : HTMLElement {
|
226
|
+
// also has obsolete members
|
227
|
+
};
|
348
228
|
|
349
|
-
interface HTMLHRElement : HTMLElement {
|
229
|
+
interface HTMLHRElement : HTMLElement {
|
230
|
+
// also has obsolete members
|
231
|
+
};
|
350
232
|
|
351
|
-
interface HTMLPreElement : HTMLElement {
|
233
|
+
interface HTMLPreElement : HTMLElement {
|
234
|
+
// also has obsolete members
|
235
|
+
};
|
352
236
|
|
353
237
|
interface HTMLQuoteElement : HTMLElement {
|
354
238
|
attribute DOMString cite;
|
@@ -358,69 +242,67 @@ interface HTMLOListElement : HTMLElement {
|
|
358
242
|
attribute boolean reversed;
|
359
243
|
attribute long start;
|
360
244
|
attribute DOMString type;
|
245
|
+
|
246
|
+
// also has obsolete members
|
361
247
|
};
|
362
248
|
|
363
|
-
interface HTMLUListElement : HTMLElement {
|
249
|
+
interface HTMLUListElement : HTMLElement {
|
250
|
+
// also has obsolete members
|
251
|
+
};
|
364
252
|
|
365
253
|
interface HTMLLIElement : HTMLElement {
|
366
254
|
attribute long value;
|
255
|
+
|
256
|
+
// also has obsolete members
|
367
257
|
};
|
368
258
|
|
369
|
-
interface HTMLDListElement : HTMLElement {
|
259
|
+
interface HTMLDListElement : HTMLElement {
|
260
|
+
// also has obsolete members
|
261
|
+
};
|
370
262
|
|
371
|
-
interface HTMLDivElement : HTMLElement {
|
263
|
+
interface HTMLDivElement : HTMLElement {
|
264
|
+
// also has obsolete members
|
265
|
+
};
|
372
266
|
|
373
267
|
interface HTMLAnchorElement : HTMLElement {
|
374
|
-
stringifier attribute DOMString href;
|
375
268
|
attribute DOMString target;
|
376
|
-
|
377
269
|
attribute DOMString download;
|
378
|
-
|
379
|
-
|
270
|
+
[PutForwards=value] attribute DOMSettableTokenList ping;
|
380
271
|
attribute DOMString rel;
|
381
272
|
readonly attribute DOMTokenList relList;
|
382
|
-
attribute DOMString media;
|
383
273
|
attribute DOMString hreflang;
|
384
274
|
attribute DOMString type;
|
385
275
|
|
386
276
|
attribute DOMString text;
|
387
277
|
|
388
|
-
//
|
389
|
-
attribute DOMString protocol;
|
390
|
-
attribute DOMString host;
|
391
|
-
attribute DOMString hostname;
|
392
|
-
attribute DOMString port;
|
393
|
-
attribute DOMString pathname;
|
394
|
-
attribute DOMString search;
|
395
|
-
attribute DOMString hash;
|
278
|
+
// also has obsolete members
|
396
279
|
};
|
280
|
+
HTMLAnchorElement implements URLUtils;
|
397
281
|
|
398
282
|
interface HTMLDataElement : HTMLElement {
|
399
283
|
attribute DOMString value;
|
400
284
|
};
|
401
285
|
|
402
286
|
interface HTMLTimeElement : HTMLElement {
|
403
|
-
attribute DOMString
|
287
|
+
attribute DOMString dateTime;
|
404
288
|
};
|
405
289
|
|
406
290
|
interface HTMLSpanElement : HTMLElement {};
|
407
291
|
|
408
|
-
interface HTMLBRElement : HTMLElement {
|
292
|
+
interface HTMLBRElement : HTMLElement {
|
293
|
+
// also has obsolete members
|
294
|
+
};
|
409
295
|
|
410
296
|
interface HTMLModElement : HTMLElement {
|
411
297
|
attribute DOMString cite;
|
412
298
|
attribute DOMString dateTime;
|
413
299
|
};
|
414
300
|
|
415
|
-
[NamedConstructor=Image()
|
416
|
-
NamedConstructor=Image(unsigned long width),
|
417
|
-
NamedConstructor=Image(unsigned long width, unsigned long height)]
|
301
|
+
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
|
418
302
|
interface HTMLImageElement : HTMLElement {
|
419
303
|
attribute DOMString alt;
|
420
304
|
attribute DOMString src;
|
421
|
-
|
422
305
|
attribute DOMString srcset;
|
423
|
-
|
424
306
|
attribute DOMString crossOrigin;
|
425
307
|
attribute DOMString useMap;
|
426
308
|
attribute boolean isMap;
|
@@ -429,6 +311,8 @@ interface HTMLImageElement : HTMLElement {
|
|
429
311
|
readonly attribute unsigned long naturalWidth;
|
430
312
|
readonly attribute unsigned long naturalHeight;
|
431
313
|
readonly attribute boolean complete;
|
314
|
+
|
315
|
+
// also has obsolete members
|
432
316
|
};
|
433
317
|
|
434
318
|
interface HTMLIFrameElement : HTMLElement {
|
@@ -437,10 +321,13 @@ interface HTMLIFrameElement : HTMLElement {
|
|
437
321
|
attribute DOMString name;
|
438
322
|
[PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
|
439
323
|
attribute boolean seamless;
|
324
|
+
attribute boolean allowFullscreen;
|
440
325
|
attribute DOMString width;
|
441
326
|
attribute DOMString height;
|
442
327
|
readonly attribute Document? contentDocument;
|
443
328
|
readonly attribute WindowProxy? contentWindow;
|
329
|
+
|
330
|
+
// also has obsolete members
|
444
331
|
};
|
445
332
|
|
446
333
|
interface HTMLEmbedElement : HTMLElement {
|
@@ -449,6 +336,8 @@ interface HTMLEmbedElement : HTMLElement {
|
|
449
336
|
attribute DOMString width;
|
450
337
|
attribute DOMString height;
|
451
338
|
legacycaller any (any... arguments);
|
339
|
+
|
340
|
+
// also has obsolete members
|
452
341
|
};
|
453
342
|
|
454
343
|
interface HTMLObjectElement : HTMLElement {
|
@@ -467,14 +356,19 @@ interface HTMLObjectElement : HTMLElement {
|
|
467
356
|
readonly attribute ValidityState validity;
|
468
357
|
readonly attribute DOMString validationMessage;
|
469
358
|
boolean checkValidity();
|
359
|
+
boolean reportValidity();
|
470
360
|
void setCustomValidity(DOMString error);
|
471
361
|
|
472
362
|
legacycaller any (any... arguments);
|
363
|
+
|
364
|
+
// also has obsolete members
|
473
365
|
};
|
474
366
|
|
475
367
|
interface HTMLParamElement : HTMLElement {
|
476
368
|
attribute DOMString name;
|
477
369
|
attribute DOMString value;
|
370
|
+
|
371
|
+
// also has obsolete members
|
478
372
|
};
|
479
373
|
|
480
374
|
interface HTMLVideoElement : HTMLMediaElement {
|
@@ -485,14 +379,12 @@ interface HTMLVideoElement : HTMLMediaElement {
|
|
485
379
|
attribute DOMString poster;
|
486
380
|
};
|
487
381
|
|
488
|
-
[NamedConstructor=Audio()
|
489
|
-
NamedConstructor=Audio(DOMString src)]
|
382
|
+
[NamedConstructor=Audio(optional DOMString src)]
|
490
383
|
interface HTMLAudioElement : HTMLMediaElement {};
|
491
384
|
|
492
385
|
interface HTMLSourceElement : HTMLElement {
|
493
386
|
attribute DOMString src;
|
494
387
|
attribute DOMString type;
|
495
|
-
attribute DOMString media;
|
496
388
|
};
|
497
389
|
|
498
390
|
interface HTMLTrackElement : HTMLElement {
|
@@ -511,6 +403,7 @@ interface HTMLTrackElement : HTMLElement {
|
|
511
403
|
readonly attribute TextTrack track;
|
512
404
|
};
|
513
405
|
|
406
|
+
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
|
514
407
|
interface HTMLMediaElement : HTMLElement {
|
515
408
|
|
516
409
|
// error state
|
@@ -528,7 +421,7 @@ interface HTMLMediaElement : HTMLElement {
|
|
528
421
|
attribute DOMString preload;
|
529
422
|
readonly attribute TimeRanges buffered;
|
530
423
|
void load();
|
531
|
-
|
424
|
+
CanPlayTypeResult canPlayType(DOMString type);
|
532
425
|
|
533
426
|
// ready state
|
534
427
|
const unsigned short HAVE_NOTHING = 0;
|
@@ -541,8 +434,9 @@ interface HTMLMediaElement : HTMLElement {
|
|
541
434
|
|
542
435
|
// playback state
|
543
436
|
attribute double currentTime;
|
437
|
+
void fastSeek(double time);
|
544
438
|
readonly attribute unrestricted double duration;
|
545
|
-
|
439
|
+
Date getStartDate();
|
546
440
|
readonly attribute boolean paused;
|
547
441
|
attribute double defaultPlaybackRate;
|
548
442
|
attribute double playbackRate;
|
@@ -568,7 +462,7 @@ interface HTMLMediaElement : HTMLElement {
|
|
568
462
|
readonly attribute AudioTrackList audioTracks;
|
569
463
|
readonly attribute VideoTrackList videoTracks;
|
570
464
|
readonly attribute TextTrackList textTracks;
|
571
|
-
TextTrack addTextTrack(
|
465
|
+
TextTrack addTextTrack(TextTrackKind kind, optional DOMString label = "", optional DOMString language = "");
|
572
466
|
};
|
573
467
|
|
574
468
|
interface MediaError {
|
@@ -618,7 +512,7 @@ interface VideoTrack {
|
|
618
512
|
|
619
513
|
enum MediaControllerPlaybackState { "waiting", "playing", "ended" };
|
620
514
|
[Constructor]
|
621
|
-
interface MediaController {
|
515
|
+
interface MediaController : EventTarget {
|
622
516
|
readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values
|
623
517
|
|
624
518
|
readonly attribute TimeRanges buffered;
|
@@ -629,8 +523,9 @@ interface MediaController {
|
|
629
523
|
readonly attribute boolean paused;
|
630
524
|
readonly attribute MediaControllerPlaybackState playbackState;
|
631
525
|
readonly attribute TimeRanges played;
|
632
|
-
void play();
|
633
526
|
void pause();
|
527
|
+
void unpause();
|
528
|
+
void play(); // calls play() on all media elements as well
|
634
529
|
|
635
530
|
attribute double defaultPlaybackRate;
|
636
531
|
attribute double playbackRate;
|
@@ -658,16 +553,21 @@ interface MediaController {
|
|
658
553
|
interface TextTrackList : EventTarget {
|
659
554
|
readonly attribute unsigned long length;
|
660
555
|
getter TextTrack (unsigned long index);
|
556
|
+
TextTrack? getTrackById(DOMString id);
|
661
557
|
|
558
|
+
attribute EventHandler onchange;
|
662
559
|
attribute EventHandler onaddtrack;
|
663
560
|
attribute EventHandler onremovetrack;
|
664
561
|
};
|
665
562
|
|
666
|
-
enum TextTrackMode { "disabled",
|
563
|
+
enum TextTrackMode { "disabled", "hidden", "showing" };
|
564
|
+
enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" };
|
667
565
|
interface TextTrack : EventTarget {
|
668
|
-
readonly attribute
|
566
|
+
readonly attribute TextTrackKind kind;
|
669
567
|
readonly attribute DOMString label;
|
670
568
|
readonly attribute DOMString language;
|
569
|
+
|
570
|
+
readonly attribute DOMString id;
|
671
571
|
readonly attribute DOMString inBandMetadataTrackDispatchType;
|
672
572
|
|
673
573
|
attribute TextTrackMode mode;
|
@@ -687,8 +587,6 @@ interface TextTrackCueList {
|
|
687
587
|
TextTrackCue? getCueById(DOMString id);
|
688
588
|
};
|
689
589
|
|
690
|
-
|
691
|
-
[Constructor(double startTime, double endTime, DOMString text)]
|
692
590
|
interface TextTrackCue : EventTarget {
|
693
591
|
readonly attribute TextTrack? track;
|
694
592
|
|
@@ -696,14 +594,6 @@ interface TextTrackCue : EventTarget {
|
|
696
594
|
attribute double startTime;
|
697
595
|
attribute double endTime;
|
698
596
|
attribute boolean pauseOnExit;
|
699
|
-
attribute DOMString vertical;
|
700
|
-
attribute boolean snapToLines;
|
701
|
-
attribute long line;
|
702
|
-
attribute long position;
|
703
|
-
attribute long size;
|
704
|
-
attribute DOMString align;
|
705
|
-
attribute DOMString text;
|
706
|
-
DocumentFragment getCueAsHTML();
|
707
597
|
|
708
598
|
attribute EventHandler onenter;
|
709
599
|
attribute EventHandler onexit;
|
@@ -717,295 +607,93 @@ interface TimeRanges {
|
|
717
607
|
|
718
608
|
[Constructor(DOMString type, optional TrackEventInit eventInitDict)]
|
719
609
|
interface TrackEvent : Event {
|
720
|
-
readonly attribute
|
610
|
+
readonly attribute (VideoTrack or AudioTrack or TextTrack) track;
|
721
611
|
};
|
722
612
|
|
723
613
|
dictionary TrackEventInit : EventInit {
|
724
|
-
|
614
|
+
(VideoTrack or AudioTrack or TextTrack) track;
|
725
615
|
};
|
726
616
|
|
727
|
-
interface
|
728
|
-
attribute
|
729
|
-
|
617
|
+
interface HTMLMapElement : HTMLElement {
|
618
|
+
attribute DOMString name;
|
619
|
+
readonly attribute HTMLCollection areas;
|
620
|
+
readonly attribute HTMLCollection images;
|
621
|
+
};
|
730
622
|
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
623
|
+
interface HTMLAreaElement : HTMLElement {
|
624
|
+
attribute DOMString alt;
|
625
|
+
attribute DOMString coords;
|
626
|
+
attribute DOMString shape;
|
627
|
+
attribute DOMString target;
|
628
|
+
attribute DOMString download;
|
629
|
+
[PutForwards=value] attribute DOMSettableTokenList ping;
|
630
|
+
attribute DOMString rel;
|
631
|
+
readonly attribute DOMTokenList relList;
|
632
|
+
attribute DOMString hreflang;
|
633
|
+
attribute DOMString type;
|
735
634
|
|
736
|
-
|
635
|
+
// also has obsolete members
|
737
636
|
};
|
637
|
+
HTMLAreaElement implements URLUtils;
|
738
638
|
|
739
|
-
interface
|
639
|
+
interface HTMLTableElement : HTMLElement {
|
640
|
+
attribute HTMLTableCaptionElement? caption;
|
641
|
+
HTMLElement createCaption();
|
642
|
+
void deleteCaption();
|
643
|
+
attribute HTMLTableSectionElement? tHead;
|
644
|
+
HTMLElement createTHead();
|
645
|
+
void deleteTHead();
|
646
|
+
attribute HTMLTableSectionElement? tFoot;
|
647
|
+
HTMLElement createTFoot();
|
648
|
+
void deleteTFoot();
|
649
|
+
readonly attribute HTMLCollection tBodies;
|
650
|
+
HTMLElement createTBody();
|
651
|
+
readonly attribute HTMLCollection rows;
|
652
|
+
HTMLElement insertRow(optional long index = -1);
|
653
|
+
void deleteRow(long index);
|
654
|
+
attribute boolean sortable;
|
655
|
+
void stopSorting();
|
740
656
|
|
741
|
-
//
|
742
|
-
|
657
|
+
// also has obsolete members
|
658
|
+
};
|
743
659
|
|
744
|
-
|
745
|
-
|
746
|
-
|
660
|
+
interface HTMLTableCaptionElement : HTMLElement {
|
661
|
+
// also has obsolete members
|
662
|
+
};
|
747
663
|
|
748
|
-
|
749
|
-
attribute
|
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);
|
755
|
-
void resetTransform();
|
664
|
+
interface HTMLTableColElement : HTMLElement {
|
665
|
+
attribute unsigned long span;
|
756
666
|
|
757
|
-
//
|
758
|
-
|
759
|
-
attribute DOMString globalCompositeOperation; // (default source-over)
|
667
|
+
// also has obsolete members
|
668
|
+
};
|
760
669
|
|
761
|
-
|
762
|
-
|
670
|
+
interface HTMLTableSectionElement : HTMLElement {
|
671
|
+
readonly attribute HTMLCollection rows;
|
672
|
+
HTMLElement insertRow(optional long index = -1);
|
673
|
+
void deleteRow(long index);
|
763
674
|
|
764
|
-
//
|
765
|
-
|
766
|
-
attribute any fillStyle; // (default black)
|
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);
|
769
|
-
CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, DOMString repetition);
|
675
|
+
// also has obsolete members
|
676
|
+
};
|
770
677
|
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
678
|
+
interface HTMLTableRowElement : HTMLElement {
|
679
|
+
readonly attribute long rowIndex;
|
680
|
+
readonly attribute long sectionRowIndex;
|
681
|
+
readonly attribute HTMLCollection cells;
|
682
|
+
HTMLElement insertCell(optional long index = -1);
|
683
|
+
void deleteCell(long index);
|
776
684
|
|
777
|
-
//
|
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);
|
781
|
-
|
782
|
-
// path API (see also CanvasPathMethods)
|
783
|
-
void beginPath();
|
784
|
-
void fill();
|
785
|
-
void fill(Path path);
|
786
|
-
void stroke();
|
787
|
-
void stroke(Path path);
|
788
|
-
void drawSystemFocusRing(Element element);
|
789
|
-
void drawSystemFocusRing(Path path, Element element);
|
790
|
-
boolean drawCustomFocusRing(Element element);
|
791
|
-
boolean drawCustomFocusRing(Path path, Element element);
|
792
|
-
void scrollPathIntoView();
|
793
|
-
void scrollPathIntoView(Path path);
|
794
|
-
void clip();
|
795
|
-
void clip(Path path);
|
796
|
-
void resetClip();
|
797
|
-
boolean isPointInPath(unrestricted double x, unrestricted double y);
|
798
|
-
boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
|
799
|
-
|
800
|
-
// text (see also the CanvasDrawingStyles interface)
|
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);
|
803
|
-
TextMetrics measureText(DOMString text);
|
804
|
-
|
805
|
-
// drawing images
|
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);
|
809
|
-
|
810
|
-
// hit regions
|
811
|
-
void addHitRegion(HitRegionOptions options);
|
812
|
-
void removeHitRegion(HitRegionOptions options);
|
813
|
-
|
814
|
-
// pixel manipulation
|
815
|
-
ImageData createImageData(double sw, double sh);
|
816
|
-
ImageData createImageData(ImageData imagedata);
|
817
|
-
ImageData createImageDataHD(double sw, double sh);
|
818
|
-
ImageData getImageData(double sx, double sy, double sw, double sh);
|
819
|
-
ImageData getImageDataHD(double sx, double sy, double sw, double sh);
|
820
|
-
void putImageData(ImageData imagedata, double dx, double dy);
|
821
|
-
void putImageDataHD(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
|
822
|
-
};
|
823
|
-
CanvasRenderingContext2D implements CanvasDrawingStyles;
|
824
|
-
CanvasRenderingContext2D implements CanvasPathMethods;
|
825
|
-
|
826
|
-
[NoInterfaceObject]
|
827
|
-
interface CanvasDrawingStyles {
|
828
|
-
// line caps/joins
|
829
|
-
attribute unrestricted double lineWidth; // (default 1)
|
830
|
-
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
|
831
|
-
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
|
832
|
-
attribute unrestricted double miterLimit; // (default 10)
|
833
|
-
|
834
|
-
// dashed lines
|
835
|
-
void setLineDash(sequence<unrestricted double> segments); // default empty
|
836
|
-
sequence<unrestricted double> getLineDash();
|
837
|
-
attribute unrestricted double lineDashOffset;
|
838
|
-
|
839
|
-
// text
|
840
|
-
attribute DOMString font; // (default 10px sans-serif)
|
841
|
-
attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
|
842
|
-
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
|
843
|
-
};
|
844
|
-
|
845
|
-
[NoInterfaceObject]
|
846
|
-
interface CanvasPathMethods {
|
847
|
-
// shared path API methods
|
848
|
-
void closePath();
|
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);
|
858
|
-
};
|
859
|
-
|
860
|
-
interface CanvasGradient {
|
861
|
-
// opaque object
|
862
|
-
void addColorStop(unrestricted double offset, DOMString color);
|
863
|
-
};
|
864
|
-
|
865
|
-
interface CanvasPattern {
|
866
|
-
// opaque object
|
867
|
-
void setTransform(SVGMatrix transform);
|
868
|
-
};
|
869
|
-
|
870
|
-
interface TextMetrics {
|
871
|
-
// x-direction
|
872
|
-
readonly attribute double width; // advance width
|
873
|
-
readonly attribute double actualBoundingBoxLeft;
|
874
|
-
readonly attribute double actualBoundingBoxRight;
|
875
|
-
|
876
|
-
// y-direction
|
877
|
-
readonly attribute double fontBoundingBoxAscent;
|
878
|
-
readonly attribute double fontBoundingBoxDescent;
|
879
|
-
readonly attribute double actualBoundingBoxAscent;
|
880
|
-
readonly attribute double actualBoundingBoxDescent;
|
881
|
-
readonly attribute double emHeightAscent;
|
882
|
-
readonly attribute double emHeightDescent;
|
883
|
-
readonly attribute double hangingBaseline;
|
884
|
-
readonly attribute double alphabeticBaseline;
|
885
|
-
readonly attribute double ideographicBaseline;
|
886
|
-
};
|
887
|
-
|
888
|
-
dictionary HitRegionOptions {
|
889
|
-
Path? path = null;
|
890
|
-
DOMString id = '';
|
891
|
-
DOMString? parentID = null;
|
892
|
-
DOMString cursor = 'inherit';
|
893
|
-
// for control-backed regions:
|
894
|
-
Element? control = null;
|
895
|
-
// for unbacked regions:
|
896
|
-
DOMString? label = null;
|
897
|
-
DOMString? role = null;
|
898
|
-
};
|
899
|
-
|
900
|
-
interface ImageData {
|
901
|
-
readonly attribute unsigned long width;
|
902
|
-
readonly attribute unsigned long height;
|
903
|
-
readonly attribute Uint8ClampedArray data;
|
904
|
-
};
|
905
|
-
|
906
|
-
[Constructor(optional Element scope)]
|
907
|
-
interface DrawingStyle { };
|
908
|
-
DrawingStyle implements CanvasDrawingStyles;
|
909
|
-
|
910
|
-
[Constructor,
|
911
|
-
Constructor(Path path),
|
912
|
-
Constructor(DOMString d)]
|
913
|
-
interface Path {
|
914
|
-
void addPath(Path path, SVGMatrix? transformation);
|
915
|
-
void addPathByStrokingPath(Path path, CanvasDrawingStyles styles, SVGMatrix? transformation);
|
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);
|
920
|
-
};
|
921
|
-
Path implements CanvasPathMethods;
|
922
|
-
|
923
|
-
partial interface Screen {
|
924
|
-
readonly attribute double canvasResolution;
|
925
|
-
};
|
926
|
-
|
927
|
-
partial interface MouseEvent {
|
928
|
-
readonly attribute DOMString? region;
|
929
|
-
};
|
930
|
-
|
931
|
-
partial dictionary MouseEventInit {
|
932
|
-
DOMString? region;
|
933
|
-
};
|
934
|
-
|
935
|
-
interface HTMLMapElement : HTMLElement {
|
936
|
-
attribute DOMString name;
|
937
|
-
readonly attribute HTMLCollection areas;
|
938
|
-
readonly attribute HTMLCollection images;
|
939
|
-
};
|
940
|
-
|
941
|
-
interface HTMLAreaElement : HTMLElement {
|
942
|
-
attribute DOMString alt;
|
943
|
-
attribute DOMString coords;
|
944
|
-
attribute DOMString shape;
|
945
|
-
stringifier attribute DOMString href;
|
946
|
-
attribute DOMString target;
|
947
|
-
|
948
|
-
attribute DOMString download;
|
949
|
-
attribute DOMString ping;
|
950
|
-
|
951
|
-
attribute DOMString rel;
|
952
|
-
readonly attribute DOMTokenList relList;
|
953
|
-
attribute DOMString media;
|
954
|
-
attribute DOMString hreflang;
|
955
|
-
attribute DOMString type;
|
956
|
-
|
957
|
-
// URL decomposition IDL attributes
|
958
|
-
attribute DOMString protocol;
|
959
|
-
attribute DOMString host;
|
960
|
-
attribute DOMString hostname;
|
961
|
-
attribute DOMString port;
|
962
|
-
attribute DOMString pathname;
|
963
|
-
attribute DOMString search;
|
964
|
-
attribute DOMString hash;
|
965
|
-
};
|
966
|
-
|
967
|
-
interface HTMLTableElement : HTMLElement {
|
968
|
-
attribute HTMLTableCaptionElement? caption;
|
969
|
-
HTMLElement createCaption();
|
970
|
-
void deleteCaption();
|
971
|
-
attribute HTMLTableSectionElement? tHead;
|
972
|
-
HTMLElement createTHead();
|
973
|
-
void deleteTHead();
|
974
|
-
attribute HTMLTableSectionElement? tFoot;
|
975
|
-
HTMLElement createTFoot();
|
976
|
-
void deleteTFoot();
|
977
|
-
readonly attribute HTMLCollection tBodies;
|
978
|
-
HTMLElement createTBody();
|
979
|
-
readonly attribute HTMLCollection rows;
|
980
|
-
HTMLElement insertRow(optional long index);
|
981
|
-
void deleteRow(long index);
|
982
|
-
attribute DOMString border;
|
983
|
-
};
|
984
|
-
|
985
|
-
interface HTMLTableCaptionElement : HTMLElement {};
|
986
|
-
|
987
|
-
interface HTMLTableColElement : HTMLElement {
|
988
|
-
attribute unsigned long span;
|
685
|
+
// also has obsolete members
|
989
686
|
};
|
990
687
|
|
991
|
-
interface
|
992
|
-
|
993
|
-
HTMLElement insertRow(optional long index);
|
994
|
-
void deleteRow(long index);
|
995
|
-
};
|
996
|
-
|
997
|
-
interface HTMLTableRowElement : HTMLElement {
|
998
|
-
readonly attribute long rowIndex;
|
999
|
-
readonly attribute long sectionRowIndex;
|
1000
|
-
readonly attribute HTMLCollection cells;
|
1001
|
-
HTMLElement insertCell(optional long index);
|
1002
|
-
void deleteCell(long index);
|
688
|
+
interface HTMLTableDataCellElement : HTMLTableCellElement {
|
689
|
+
// also has obsolete members
|
1003
690
|
};
|
1004
691
|
|
1005
|
-
interface HTMLTableDataCellElement : HTMLTableCellElement {};
|
1006
|
-
|
1007
692
|
interface HTMLTableHeaderCellElement : HTMLTableCellElement {
|
1008
693
|
attribute DOMString scope;
|
694
|
+
attribute DOMString abbr;
|
695
|
+
attribute DOMString sorted;
|
696
|
+
void sort();
|
1009
697
|
};
|
1010
698
|
|
1011
699
|
interface HTMLTableCellElement : HTMLElement {
|
@@ -1013,6 +701,8 @@ interface HTMLTableCellElement : HTMLElement {
|
|
1013
701
|
attribute unsigned long rowSpan;
|
1014
702
|
[PutForwards=value] readonly attribute DOMSettableTokenList headers;
|
1015
703
|
readonly attribute long cellIndex;
|
704
|
+
|
705
|
+
// also has obsolete members
|
1016
706
|
};
|
1017
707
|
|
1018
708
|
[OverrideBuiltins]
|
@@ -1030,31 +720,14 @@ interface HTMLFormElement : HTMLElement {
|
|
1030
720
|
readonly attribute HTMLFormControlsCollection elements;
|
1031
721
|
readonly attribute long length;
|
1032
722
|
getter Element (unsigned long index);
|
1033
|
-
getter
|
723
|
+
getter (RadioNodeList or Element) (DOMString name);
|
1034
724
|
|
1035
725
|
void submit();
|
1036
726
|
void reset();
|
1037
727
|
boolean checkValidity();
|
1038
|
-
|
1039
|
-
|
1040
|
-
interface HTMLFieldSetElement : HTMLElement {
|
1041
|
-
attribute boolean disabled;
|
1042
|
-
readonly attribute HTMLFormElement? form;
|
1043
|
-
attribute DOMString name;
|
1044
|
-
|
1045
|
-
readonly attribute DOMString type;
|
1046
|
-
|
1047
|
-
readonly attribute HTMLFormControlsCollection elements;
|
1048
|
-
|
1049
|
-
readonly attribute boolean willValidate;
|
1050
|
-
readonly attribute ValidityState validity;
|
1051
|
-
readonly attribute DOMString validationMessage;
|
1052
|
-
boolean checkValidity();
|
1053
|
-
void setCustomValidity(DOMString error);
|
1054
|
-
};
|
728
|
+
boolean reportValidity();
|
1055
729
|
|
1056
|
-
|
1057
|
-
readonly attribute HTMLFormElement? form;
|
730
|
+
void requestAutocomplete();
|
1058
731
|
};
|
1059
732
|
|
1060
733
|
interface HTMLLabelElement : HTMLElement {
|
@@ -1081,10 +754,12 @@ interface HTMLInputElement : HTMLElement {
|
|
1081
754
|
attribute DOMString formTarget;
|
1082
755
|
attribute unsigned long height;
|
1083
756
|
attribute boolean indeterminate;
|
757
|
+
attribute DOMString inputMode;
|
1084
758
|
readonly attribute HTMLElement? list;
|
1085
759
|
attribute DOMString max;
|
1086
760
|
attribute long maxLength;
|
1087
761
|
attribute DOMString min;
|
762
|
+
attribute long minLength;
|
1088
763
|
attribute boolean multiple;
|
1089
764
|
attribute DOMString name;
|
1090
765
|
attribute DOMString pattern;
|
@@ -1096,18 +771,21 @@ interface HTMLInputElement : HTMLElement {
|
|
1096
771
|
attribute DOMString step;
|
1097
772
|
attribute DOMString type;
|
1098
773
|
attribute DOMString defaultValue;
|
1099
|
-
|
774
|
+
[TreatNullAs=EmptyString] attribute DOMString value;
|
1100
775
|
attribute Date? valueAsDate;
|
1101
776
|
attribute unrestricted double valueAsNumber;
|
777
|
+
attribute double valueLow;
|
778
|
+
attribute double valueHigh;
|
1102
779
|
attribute unsigned long width;
|
1103
780
|
|
1104
|
-
void stepUp(optional long n);
|
1105
|
-
void stepDown(optional long n);
|
781
|
+
void stepUp(optional long n = 1);
|
782
|
+
void stepDown(optional long n = 1);
|
1106
783
|
|
1107
784
|
readonly attribute boolean willValidate;
|
1108
785
|
readonly attribute ValidityState validity;
|
1109
786
|
readonly attribute DOMString validationMessage;
|
1110
787
|
boolean checkValidity();
|
788
|
+
boolean reportValidity();
|
1111
789
|
void setCustomValidity(DOMString error);
|
1112
790
|
|
1113
791
|
readonly attribute NodeList labels;
|
@@ -1116,11 +794,11 @@ interface HTMLInputElement : HTMLElement {
|
|
1116
794
|
attribute unsigned long selectionStart;
|
1117
795
|
attribute unsigned long selectionEnd;
|
1118
796
|
attribute DOMString selectionDirection;
|
1119
|
-
|
1120
797
|
void setRangeText(DOMString replacement);
|
1121
|
-
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode);
|
1122
|
-
|
798
|
+
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
1123
799
|
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
800
|
+
|
801
|
+
// also has obsolete members
|
1124
802
|
};
|
1125
803
|
|
1126
804
|
interface HTMLButtonElement : HTMLElement {
|
@@ -1135,17 +813,20 @@ interface HTMLButtonElement : HTMLElement {
|
|
1135
813
|
attribute DOMString name;
|
1136
814
|
attribute DOMString type;
|
1137
815
|
attribute DOMString value;
|
816
|
+
attribute HTMLMenuElement? menu;
|
1138
817
|
|
1139
818
|
readonly attribute boolean willValidate;
|
1140
819
|
readonly attribute ValidityState validity;
|
1141
820
|
readonly attribute DOMString validationMessage;
|
1142
821
|
boolean checkValidity();
|
822
|
+
boolean reportValidity();
|
1143
823
|
void setCustomValidity(DOMString error);
|
1144
824
|
|
1145
825
|
readonly attribute NodeList labels;
|
1146
826
|
};
|
1147
827
|
|
1148
828
|
interface HTMLSelectElement : HTMLElement {
|
829
|
+
attribute DOMString autocomplete;
|
1149
830
|
attribute boolean autofocus;
|
1150
831
|
attribute boolean disabled;
|
1151
832
|
readonly attribute HTMLFormElement? form;
|
@@ -1158,11 +839,12 @@ interface HTMLSelectElement : HTMLElement {
|
|
1158
839
|
|
1159
840
|
readonly attribute HTMLOptionsCollection options;
|
1160
841
|
attribute unsigned long length;
|
1161
|
-
getter Element item(unsigned long index);
|
1162
|
-
|
842
|
+
getter Element? item(unsigned long index);
|
843
|
+
HTMLOptionElement? namedItem(DOMString name);
|
1163
844
|
void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
|
845
|
+
void remove(); // ChildNode overload
|
1164
846
|
void remove(long index);
|
1165
|
-
setter creator void (unsigned long index, HTMLOptionElement option);
|
847
|
+
setter creator void (unsigned long index, HTMLOptionElement? option);
|
1166
848
|
|
1167
849
|
readonly attribute HTMLCollection selectedOptions;
|
1168
850
|
attribute long selectedIndex;
|
@@ -1172,6 +854,7 @@ interface HTMLSelectElement : HTMLElement {
|
|
1172
854
|
readonly attribute ValidityState validity;
|
1173
855
|
readonly attribute DOMString validationMessage;
|
1174
856
|
boolean checkValidity();
|
857
|
+
boolean reportValidity();
|
1175
858
|
void setCustomValidity(DOMString error);
|
1176
859
|
|
1177
860
|
readonly attribute NodeList labels;
|
@@ -1186,11 +869,7 @@ interface HTMLOptGroupElement : HTMLElement {
|
|
1186
869
|
attribute DOMString label;
|
1187
870
|
};
|
1188
871
|
|
1189
|
-
[NamedConstructor=Option()
|
1190
|
-
NamedConstructor=Option(DOMString text),
|
1191
|
-
NamedConstructor=Option(DOMString text, DOMString value),
|
1192
|
-
NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected),
|
1193
|
-
NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected, boolean selected)]
|
872
|
+
[NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
|
1194
873
|
interface HTMLOptionElement : HTMLElement {
|
1195
874
|
attribute boolean disabled;
|
1196
875
|
readonly attribute HTMLFormElement? form;
|
@@ -1204,12 +883,15 @@ interface HTMLOptionElement : HTMLElement {
|
|
1204
883
|
};
|
1205
884
|
|
1206
885
|
interface HTMLTextAreaElement : HTMLElement {
|
886
|
+
attribute DOMString autocomplete;
|
1207
887
|
attribute boolean autofocus;
|
1208
888
|
attribute unsigned long cols;
|
1209
889
|
attribute DOMString dirName;
|
1210
890
|
attribute boolean disabled;
|
1211
891
|
readonly attribute HTMLFormElement? form;
|
892
|
+
attribute DOMString inputMode;
|
1212
893
|
attribute long maxLength;
|
894
|
+
attribute long minLength;
|
1213
895
|
attribute DOMString name;
|
1214
896
|
attribute DOMString placeholder;
|
1215
897
|
attribute boolean readOnly;
|
@@ -1219,13 +901,14 @@ interface HTMLTextAreaElement : HTMLElement {
|
|
1219
901
|
|
1220
902
|
readonly attribute DOMString type;
|
1221
903
|
attribute DOMString defaultValue;
|
1222
|
-
|
904
|
+
[TreatNullAs=EmptyString] attribute DOMString value;
|
1223
905
|
readonly attribute unsigned long textLength;
|
1224
906
|
|
1225
907
|
readonly attribute boolean willValidate;
|
1226
908
|
readonly attribute ValidityState validity;
|
1227
909
|
readonly attribute DOMString validationMessage;
|
1228
910
|
boolean checkValidity();
|
911
|
+
boolean reportValidity();
|
1229
912
|
void setCustomValidity(DOMString error);
|
1230
913
|
|
1231
914
|
readonly attribute NodeList labels;
|
@@ -1234,10 +917,8 @@ interface HTMLTextAreaElement : HTMLElement {
|
|
1234
917
|
attribute unsigned long selectionStart;
|
1235
918
|
attribute unsigned long selectionEnd;
|
1236
919
|
attribute DOMString selectionDirection;
|
1237
|
-
|
1238
920
|
void setRangeText(DOMString replacement);
|
1239
|
-
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode);
|
1240
|
-
|
921
|
+
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
1241
922
|
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
1242
923
|
};
|
1243
924
|
|
@@ -1255,6 +936,7 @@ interface HTMLKeygenElement : HTMLElement {
|
|
1255
936
|
readonly attribute ValidityState validity;
|
1256
937
|
readonly attribute DOMString validationMessage;
|
1257
938
|
boolean checkValidity();
|
939
|
+
boolean reportValidity();
|
1258
940
|
void setCustomValidity(DOMString error);
|
1259
941
|
|
1260
942
|
readonly attribute NodeList labels;
|
@@ -1273,6 +955,7 @@ interface HTMLOutputElement : HTMLElement {
|
|
1273
955
|
readonly attribute ValidityState validity;
|
1274
956
|
readonly attribute DOMString validationMessage;
|
1275
957
|
boolean checkValidity();
|
958
|
+
boolean reportValidity();
|
1276
959
|
void setCustomValidity(DOMString error);
|
1277
960
|
|
1278
961
|
readonly attribute NodeList labels;
|
@@ -1295,11 +978,45 @@ interface HTMLMeterElement : HTMLElement {
|
|
1295
978
|
readonly attribute NodeList labels;
|
1296
979
|
};
|
1297
980
|
|
981
|
+
interface HTMLFieldSetElement : HTMLElement {
|
982
|
+
attribute boolean disabled;
|
983
|
+
readonly attribute HTMLFormElement? form;
|
984
|
+
attribute DOMString name;
|
985
|
+
|
986
|
+
readonly attribute DOMString type;
|
987
|
+
|
988
|
+
readonly attribute HTMLFormControlsCollection elements;
|
989
|
+
|
990
|
+
readonly attribute boolean willValidate;
|
991
|
+
readonly attribute ValidityState validity;
|
992
|
+
readonly attribute DOMString validationMessage;
|
993
|
+
boolean checkValidity();
|
994
|
+
boolean reportValidity();
|
995
|
+
void setCustomValidity(DOMString error);
|
996
|
+
};
|
997
|
+
|
998
|
+
interface HTMLLegendElement : HTMLElement {
|
999
|
+
readonly attribute HTMLFormElement? form;
|
1000
|
+
|
1001
|
+
// also has obsolete members
|
1002
|
+
};
|
1003
|
+
|
1004
|
+
enum AutocompleteErrorReason { "" /* empty string */, "cancel", "disabled", "invalid" };
|
1005
|
+
|
1006
|
+
[Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)]
|
1007
|
+
interface AutocompleteErrorEvent : Event {
|
1008
|
+
readonly attribute AutocompleteErrorReason reason;
|
1009
|
+
};
|
1010
|
+
|
1011
|
+
dictionary AutocompleteErrorEventInit : EventInit {
|
1012
|
+
AutocompleteErrorReason reason;
|
1013
|
+
};
|
1014
|
+
|
1298
1015
|
enum SelectionMode {
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1016
|
+
"select",
|
1017
|
+
"start",
|
1018
|
+
"end",
|
1019
|
+
"preserve", // default
|
1303
1020
|
};
|
1304
1021
|
|
1305
1022
|
interface ValidityState {
|
@@ -1307,9 +1024,11 @@ interface ValidityState {
|
|
1307
1024
|
readonly attribute boolean typeMismatch;
|
1308
1025
|
readonly attribute boolean patternMismatch;
|
1309
1026
|
readonly attribute boolean tooLong;
|
1027
|
+
readonly attribute boolean tooShort;
|
1310
1028
|
readonly attribute boolean rangeUnderflow;
|
1311
1029
|
readonly attribute boolean rangeOverflow;
|
1312
1030
|
readonly attribute boolean stepMismatch;
|
1031
|
+
readonly attribute boolean badInput;
|
1313
1032
|
readonly attribute boolean customError;
|
1314
1033
|
readonly attribute boolean valid;
|
1315
1034
|
};
|
@@ -1318,19 +1037,31 @@ interface HTMLDetailsElement : HTMLElement {
|
|
1318
1037
|
attribute boolean open;
|
1319
1038
|
};
|
1320
1039
|
|
1321
|
-
interface
|
1040
|
+
interface HTMLMenuElement : HTMLElement {
|
1041
|
+
attribute DOMString type;
|
1042
|
+
attribute DOMString label;
|
1043
|
+
|
1044
|
+
// also has obsolete members
|
1045
|
+
};
|
1046
|
+
|
1047
|
+
interface HTMLMenuItemElement : HTMLElement {
|
1322
1048
|
attribute DOMString type;
|
1323
1049
|
attribute DOMString label;
|
1324
1050
|
attribute DOMString icon;
|
1325
1051
|
attribute boolean disabled;
|
1326
1052
|
attribute boolean checked;
|
1327
1053
|
attribute DOMString radiogroup;
|
1054
|
+
attribute boolean default;
|
1328
1055
|
readonly attribute HTMLElement? command;
|
1329
1056
|
};
|
1330
1057
|
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1058
|
+
[Constructor(DOMString type, optional RelatedEventInit eventInitDict)]
|
1059
|
+
interface RelatedEvent : Event {
|
1060
|
+
readonly attribute EventTarget? relatedTarget;
|
1061
|
+
};
|
1062
|
+
|
1063
|
+
dictionary RelatedEventInit : EventInit {
|
1064
|
+
EventTarget? relatedTarget;
|
1334
1065
|
};
|
1335
1066
|
|
1336
1067
|
interface HTMLDialogElement : HTMLElement {
|
@@ -1341,123 +1072,360 @@ interface HTMLDialogElement : HTMLElement {
|
|
1341
1072
|
void close(optional DOMString returnValue);
|
1342
1073
|
};
|
1343
1074
|
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
attribute DOMString
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1075
|
+
interface HTMLScriptElement : HTMLElement {
|
1076
|
+
attribute DOMString src;
|
1077
|
+
attribute DOMString type;
|
1078
|
+
attribute DOMString charset;
|
1079
|
+
attribute boolean async;
|
1080
|
+
attribute boolean defer;
|
1081
|
+
attribute DOMString crossOrigin;
|
1082
|
+
attribute DOMString text;
|
1083
|
+
|
1084
|
+
// also has obsolete members
|
1085
|
+
};
|
1086
|
+
|
1087
|
+
interface HTMLTemplateElement : HTMLElement {
|
1088
|
+
readonly attribute DocumentFragment content;
|
1089
|
+
};
|
1090
|
+
|
1091
|
+
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
|
1092
|
+
|
1093
|
+
interface HTMLCanvasElement : HTMLElement {
|
1094
|
+
attribute unsigned long width;
|
1095
|
+
attribute unsigned long height;
|
1096
|
+
|
1097
|
+
RenderingContext? getContext(DOMString contextId, any... arguments);
|
1098
|
+
boolean probablySupportsContext(DOMString contextId, any... arguments);
|
1099
|
+
|
1100
|
+
void setContext(RenderingContext context);
|
1101
|
+
CanvasProxy transferControlToProxy();
|
1102
|
+
|
1103
|
+
DOMString toDataURL(optional DOMString type, any... arguments);
|
1104
|
+
void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);
|
1105
|
+
};
|
1106
|
+
|
1107
|
+
[Exposed=Window,Worker]
|
1108
|
+
interface CanvasProxy {
|
1109
|
+
void setContext(RenderingContext context);
|
1110
|
+
};
|
1111
|
+
// CanvasProxy implements Transferable;
|
1112
|
+
|
1113
|
+
typedef (HTMLImageElement or
|
1114
|
+
HTMLVideoElement or
|
1115
|
+
HTMLCanvasElement or
|
1116
|
+
CanvasRenderingContext2D or
|
1117
|
+
ImageBitmap) CanvasImageSource;
|
1118
|
+
|
1119
|
+
enum CanvasFillRule { "nonzero", "evenodd" };
|
1120
|
+
|
1121
|
+
[Constructor(optional unsigned long width, unsigned long height), Exposed=Window,Worker]
|
1122
|
+
interface CanvasRenderingContext2D {
|
1123
|
+
|
1124
|
+
// back-reference to the canvas
|
1125
|
+
readonly attribute HTMLCanvasElement canvas;
|
1126
|
+
|
1127
|
+
// canvas dimensions
|
1128
|
+
attribute unsigned long width;
|
1129
|
+
attribute unsigned long height;
|
1130
|
+
|
1131
|
+
// for contexts that aren't directly fixed to a specific canvas
|
1132
|
+
void commit(); // push the image to the output bitmap
|
1133
|
+
|
1134
|
+
// state
|
1135
|
+
void save(); // push state on state stack
|
1136
|
+
void restore(); // pop state stack and restore state
|
1137
|
+
|
1138
|
+
// transformations (default transform is the identity matrix)
|
1139
|
+
attribute SVGMatrix currentTransform;
|
1140
|
+
void scale(unrestricted double x, unrestricted double y);
|
1141
|
+
void rotate(unrestricted double angle);
|
1142
|
+
void translate(unrestricted double x, unrestricted double y);
|
1143
|
+
void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
1144
|
+
void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
1145
|
+
void resetTransform();
|
1146
|
+
|
1147
|
+
// compositing
|
1148
|
+
attribute unrestricted double globalAlpha; // (default 1.0)
|
1149
|
+
attribute DOMString globalCompositeOperation; // (default source-over)
|
1150
|
+
|
1151
|
+
// image smoothing
|
1152
|
+
attribute boolean imageSmoothingEnabled; // (default true)
|
1153
|
+
|
1154
|
+
// colors and styles (see also the CanvasDrawingStyles interface)
|
1155
|
+
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
1156
|
+
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
1157
|
+
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
|
1158
|
+
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
|
1159
|
+
CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
1160
|
+
|
1161
|
+
// shadows
|
1162
|
+
attribute unrestricted double shadowOffsetX; // (default 0)
|
1163
|
+
attribute unrestricted double shadowOffsetY; // (default 0)
|
1164
|
+
attribute unrestricted double shadowBlur; // (default 0)
|
1165
|
+
attribute DOMString shadowColor; // (default transparent black)
|
1166
|
+
|
1167
|
+
// rects
|
1168
|
+
void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
1169
|
+
void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
1170
|
+
void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
1171
|
+
|
1172
|
+
// path API (see also CanvasPathMethods)
|
1173
|
+
void beginPath();
|
1174
|
+
void fill(optional CanvasFillRule fillRule = "nonzero");
|
1175
|
+
void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero");
|
1176
|
+
void stroke();
|
1177
|
+
void stroke(Path2D path);
|
1178
|
+
void drawSystemFocusRing(Element element);
|
1179
|
+
void drawSystemFocusRing(Path2D path, Element element);
|
1180
|
+
boolean drawCustomFocusRing(Element element);
|
1181
|
+
boolean drawCustomFocusRing(Path2D path, Element element);
|
1182
|
+
void scrollPathIntoView();
|
1183
|
+
void scrollPathIntoView(Path2D path);
|
1184
|
+
void clip(optional CanvasFillRule fillRule = "nonzero");
|
1185
|
+
void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
|
1186
|
+
void resetClip();
|
1187
|
+
boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero");
|
1188
|
+
boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero");
|
1189
|
+
boolean isPointInStroke(unrestricted double x, unrestricted double y);
|
1190
|
+
boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
1191
|
+
|
1192
|
+
// text (see also the CanvasDrawingStyles interface)
|
1193
|
+
void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
1194
|
+
void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
1195
|
+
TextMetrics measureText(DOMString text);
|
1196
|
+
|
1197
|
+
// drawing images
|
1198
|
+
void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy);
|
1199
|
+
void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
|
1200
|
+
void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
|
1201
|
+
|
1202
|
+
// hit regions
|
1203
|
+
void addHitRegion(optional HitRegionOptions options);
|
1204
|
+
void removeHitRegion(DOMString id);
|
1205
|
+
|
1206
|
+
// pixel manipulation
|
1207
|
+
ImageData createImageData(double sw, double sh);
|
1208
|
+
ImageData createImageData(ImageData imagedata);
|
1209
|
+
ImageData getImageData(double sx, double sy, double sw, double sh);
|
1210
|
+
void putImageData(ImageData imagedata, double dx, double dy);
|
1211
|
+
void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
|
1212
|
+
};
|
1213
|
+
CanvasRenderingContext2D implements CanvasDrawingStyles;
|
1214
|
+
CanvasRenderingContext2D implements CanvasPathMethods;
|
1215
|
+
|
1216
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1217
|
+
interface CanvasDrawingStyles {
|
1218
|
+
// line caps/joins
|
1219
|
+
attribute unrestricted double lineWidth; // (default 1)
|
1220
|
+
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
|
1221
|
+
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
|
1222
|
+
attribute unrestricted double miterLimit; // (default 10)
|
1223
|
+
|
1224
|
+
// dashed lines
|
1225
|
+
void setLineDash(sequence<unrestricted double> segments); // default empty
|
1226
|
+
sequence<unrestricted double> getLineDash();
|
1227
|
+
attribute unrestricted double lineDashOffset;
|
1228
|
+
|
1229
|
+
// text
|
1230
|
+
attribute DOMString font; // (default 10px sans-serif)
|
1231
|
+
attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
|
1232
|
+
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
|
1233
|
+
attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
1234
|
+
};
|
1235
|
+
|
1236
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1237
|
+
interface CanvasPathMethods {
|
1238
|
+
// shared path API methods
|
1239
|
+
void closePath();
|
1240
|
+
void moveTo(unrestricted double x, unrestricted double y);
|
1241
|
+
void lineTo(unrestricted double x, unrestricted double y);
|
1242
|
+
void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y);
|
1243
|
+
void bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
|
1244
|
+
void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius);
|
1245
|
+
void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation);
|
1246
|
+
void rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
1247
|
+
void arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);
|
1248
|
+
void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);
|
1249
|
+
};
|
1250
|
+
|
1251
|
+
[Exposed=Window,Worker]
|
1252
|
+
interface CanvasGradient {
|
1253
|
+
// opaque object
|
1254
|
+
void addColorStop(double offset, DOMString color);
|
1255
|
+
};
|
1256
|
+
|
1257
|
+
[Exposed=Window,Worker]
|
1258
|
+
interface CanvasPattern {
|
1259
|
+
// opaque object
|
1260
|
+
void setTransform(SVGMatrix transform);
|
1261
|
+
};
|
1262
|
+
|
1263
|
+
[Exposed=Window,Worker]
|
1264
|
+
interface TextMetrics {
|
1265
|
+
// x-direction
|
1266
|
+
readonly attribute double width; // advance width
|
1267
|
+
readonly attribute double actualBoundingBoxLeft;
|
1268
|
+
readonly attribute double actualBoundingBoxRight;
|
1269
|
+
|
1270
|
+
// y-direction
|
1271
|
+
readonly attribute double fontBoundingBoxAscent;
|
1272
|
+
readonly attribute double fontBoundingBoxDescent;
|
1273
|
+
readonly attribute double actualBoundingBoxAscent;
|
1274
|
+
readonly attribute double actualBoundingBoxDescent;
|
1275
|
+
readonly attribute double emHeightAscent;
|
1276
|
+
readonly attribute double emHeightDescent;
|
1277
|
+
readonly attribute double hangingBaseline;
|
1278
|
+
readonly attribute double alphabeticBaseline;
|
1279
|
+
readonly attribute double ideographicBaseline;
|
1280
|
+
};
|
1281
|
+
|
1282
|
+
dictionary HitRegionOptions {
|
1283
|
+
Path2D? path = null;
|
1284
|
+
CanvasFillRule fillRule = "nonzero";
|
1285
|
+
DOMString id = "";
|
1286
|
+
DOMString? parentID = null;
|
1287
|
+
DOMString cursor = "inherit";
|
1288
|
+
// for control-backed regions:
|
1289
|
+
Element? control = null;
|
1290
|
+
// for unbacked regions:
|
1291
|
+
DOMString? label = null;
|
1292
|
+
DOMString? role = null;
|
1293
|
+
};
|
1294
|
+
|
1295
|
+
[Constructor(unsigned long sw, unsigned long sh),
|
1296
|
+
Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh),
|
1297
|
+
Exposed=Window,Worker]
|
1298
|
+
interface ImageData {
|
1299
|
+
readonly attribute unsigned long width;
|
1300
|
+
readonly attribute unsigned long height;
|
1301
|
+
readonly attribute Uint8ClampedArray data;
|
1302
|
+
};
|
1303
|
+
|
1304
|
+
[Constructor(optional Element scope), Exposed=Window,Worker]
|
1305
|
+
interface DrawingStyle { };
|
1306
|
+
DrawingStyle implements CanvasDrawingStyles;
|
1307
|
+
|
1308
|
+
[Constructor,
|
1309
|
+
Constructor(Path2D path),
|
1310
|
+
Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"),
|
1311
|
+
Constructor(DOMString d), Exposed=Window,Worker]
|
1312
|
+
interface Path2D {
|
1313
|
+
void addPath(Path2D path, optional SVGMatrix? transformation = null);
|
1314
|
+
void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null);
|
1315
|
+
void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
1316
|
+
void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
1317
|
+
void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth);
|
1318
|
+
void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth);
|
1319
|
+
};
|
1320
|
+
Path2D implements CanvasPathMethods;
|
1321
|
+
|
1322
|
+
partial interface MouseEvent {
|
1323
|
+
readonly attribute DOMString? region;
|
1324
|
+
};
|
1325
|
+
|
1326
|
+
partial dictionary MouseEventInit {
|
1327
|
+
DOMString? region;
|
1328
|
+
};
|
1329
|
+
|
1330
|
+
partial interface Touch {
|
1331
|
+
readonly attribute DOMString? region;
|
1332
|
+
};
|
1333
|
+
|
1334
|
+
interface DataTransfer {
|
1335
|
+
attribute DOMString dropEffect;
|
1336
|
+
attribute DOMString effectAllowed;
|
1337
|
+
|
1338
|
+
readonly attribute DataTransferItemList items;
|
1339
|
+
|
1340
|
+
void setDragImage(Element image, long x, long y);
|
1341
|
+
|
1342
|
+
/* old interface */
|
1343
|
+
readonly attribute DOMString[] types;
|
1344
|
+
DOMString getData(DOMString format);
|
1345
|
+
void setData(DOMString format, DOMString data);
|
1346
|
+
void clearData(optional DOMString format);
|
1347
|
+
readonly attribute FileList files;
|
1348
|
+
};
|
1349
|
+
|
1350
|
+
interface DataTransferItemList {
|
1351
|
+
readonly attribute unsigned long length;
|
1352
|
+
getter DataTransferItem (unsigned long index);
|
1353
|
+
DataTransferItem? add(DOMString data, DOMString type);
|
1354
|
+
DataTransferItem? add(File data);
|
1355
|
+
void remove(unsigned long index);
|
1356
|
+
void clear();
|
1357
|
+
};
|
1358
|
+
|
1359
|
+
interface DataTransferItem {
|
1360
|
+
readonly attribute DOMString kind;
|
1361
|
+
readonly attribute DOMString type;
|
1362
|
+
void getAsString(FunctionStringCallback? _callback);
|
1363
|
+
File? getAsFile();
|
1364
|
+
};
|
1365
|
+
|
1366
|
+
callback FunctionStringCallback = void (DOMString data);
|
1367
|
+
|
1368
|
+
[Constructor(DOMString type, optional DragEventInit eventInitDict)]
|
1369
|
+
interface DragEvent : MouseEvent {
|
1370
|
+
readonly attribute DataTransfer? dataTransfer;
|
1371
|
+
};
|
1372
|
+
|
1373
|
+
dictionary DragEventInit : MouseEventInit {
|
1374
|
+
DataTransfer? dataTransfer;
|
1375
|
+
};
|
1376
|
+
|
1377
|
+
[PrimaryGlobal]
|
1378
|
+
/*sealed*/ interface Window : EventTarget {
|
1379
|
+
// the current browsing context
|
1380
|
+
[Unforgeable] readonly attribute WindowProxy window;
|
1381
|
+
[Replaceable] readonly attribute WindowProxy self;
|
1382
|
+
[Unforgeable] readonly attribute Document document;
|
1383
|
+
attribute DOMString name;
|
1384
|
+
[PutForwards=href, Unforgeable] readonly attribute Location location;
|
1385
|
+
readonly attribute History history;
|
1386
|
+
[Replaceable] readonly attribute BarProp locationbar;
|
1387
|
+
[Replaceable] readonly attribute BarProp menubar;
|
1388
|
+
[Replaceable] readonly attribute BarProp personalbar;
|
1389
|
+
[Replaceable] readonly attribute BarProp scrollbars;
|
1390
|
+
[Replaceable] readonly attribute BarProp statusbar;
|
1391
|
+
[Replaceable] readonly attribute BarProp toolbar;
|
1392
|
+
attribute DOMString status;
|
1393
|
+
void close();
|
1394
|
+
readonly attribute boolean closed;
|
1395
|
+
void stop();
|
1396
|
+
void focus();
|
1363
1397
|
void blur();
|
1364
1398
|
|
1365
1399
|
// other browsing contexts
|
1366
1400
|
[Replaceable] readonly attribute WindowProxy frames;
|
1367
1401
|
[Replaceable] readonly attribute unsigned long length;
|
1368
1402
|
[Unforgeable] readonly attribute WindowProxy top;
|
1369
|
-
attribute
|
1403
|
+
attribute any opener;
|
1370
1404
|
readonly attribute WindowProxy parent;
|
1371
1405
|
readonly attribute Element? frameElement;
|
1372
|
-
WindowProxy open(optional DOMString url, optional DOMString target, optional DOMString features, optional boolean replace);
|
1406
|
+
WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
|
1373
1407
|
getter WindowProxy (unsigned long index);
|
1374
1408
|
getter object (DOMString name);
|
1375
1409
|
|
1376
1410
|
// the user agent
|
1377
|
-
readonly attribute Navigator navigator;
|
1378
|
-
readonly attribute External external;
|
1411
|
+
readonly attribute Navigator navigator;
|
1412
|
+
[Replaceable] readonly attribute External external;
|
1379
1413
|
readonly attribute ApplicationCache applicationCache;
|
1380
1414
|
|
1381
1415
|
// user prompts
|
1416
|
+
void alert();
|
1382
1417
|
void alert(DOMString message);
|
1383
|
-
boolean confirm(DOMString message);
|
1384
|
-
DOMString? prompt(DOMString message, optional DOMString default);
|
1418
|
+
boolean confirm(optional DOMString message = "");
|
1419
|
+
DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
|
1385
1420
|
void print();
|
1386
1421
|
any showModalDialog(DOMString url, optional any argument);
|
1387
1422
|
|
1388
|
-
// cross-document messaging
|
1389
1423
|
void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer);
|
1390
1424
|
|
1391
|
-
//
|
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;
|
1425
|
+
// also has obsolete members
|
1460
1426
|
};
|
1427
|
+
Window implements GlobalEventHandlers;
|
1428
|
+
Window implements WindowEventHandlers;
|
1461
1429
|
|
1462
1430
|
interface BarProp {
|
1463
1431
|
attribute boolean visible;
|
@@ -1469,27 +1437,18 @@ interface History {
|
|
1469
1437
|
void go(optional long delta);
|
1470
1438
|
void back();
|
1471
1439
|
void forward();
|
1472
|
-
void pushState(any data, DOMString title, optional DOMString url);
|
1473
|
-
void replaceState(any data, DOMString title, optional DOMString url);
|
1440
|
+
void pushState(any data, DOMString title, optional DOMString? url = null);
|
1441
|
+
void replaceState(any data, DOMString title, optional DOMString? url = null);
|
1474
1442
|
};
|
1475
1443
|
|
1476
|
-
interface Location {
|
1477
|
-
stringifier attribute DOMString href;
|
1444
|
+
[Unforgeable] interface Location {
|
1478
1445
|
void assign(DOMString url);
|
1479
1446
|
void replace(DOMString url);
|
1480
1447
|
void reload();
|
1481
|
-
|
1482
|
-
// URL decomposition IDL attributes
|
1483
|
-
attribute DOMString protocol;
|
1484
|
-
attribute DOMString host;
|
1485
|
-
attribute DOMString hostname;
|
1486
|
-
attribute DOMString port;
|
1487
|
-
attribute DOMString pathname;
|
1488
|
-
attribute DOMString search;
|
1489
|
-
attribute DOMString hash;
|
1490
1448
|
};
|
1449
|
+
Location implements URLUtils;
|
1491
1450
|
|
1492
|
-
[Constructor(DOMString type, optional PopStateEventInit eventInitDict)]
|
1451
|
+
[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=Window,Worker]
|
1493
1452
|
interface PopStateEvent : Event {
|
1494
1453
|
readonly attribute any state;
|
1495
1454
|
};
|
@@ -1498,7 +1457,7 @@ dictionary PopStateEventInit : EventInit {
|
|
1498
1457
|
any state;
|
1499
1458
|
};
|
1500
1459
|
|
1501
|
-
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict)]
|
1460
|
+
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=Window,Worker]
|
1502
1461
|
interface HashChangeEvent : Event {
|
1503
1462
|
readonly attribute DOMString oldURL;
|
1504
1463
|
readonly attribute DOMString newURL;
|
@@ -1509,7 +1468,7 @@ dictionary HashChangeEventInit : EventInit {
|
|
1509
1468
|
DOMString newURL;
|
1510
1469
|
};
|
1511
1470
|
|
1512
|
-
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)]
|
1471
|
+
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=Window,Worker]
|
1513
1472
|
interface PageTransitionEvent : Event {
|
1514
1473
|
readonly attribute boolean persisted;
|
1515
1474
|
};
|
@@ -1522,6 +1481,7 @@ interface BeforeUnloadEvent : Event {
|
|
1522
1481
|
attribute DOMString returnValue;
|
1523
1482
|
};
|
1524
1483
|
|
1484
|
+
[Exposed=Window,SharedWorker]
|
1525
1485
|
interface ApplicationCache : EventTarget {
|
1526
1486
|
|
1527
1487
|
// update status
|
@@ -1544,65 +1504,180 @@ interface ApplicationCache : EventTarget {
|
|
1544
1504
|
attribute EventHandler onnoupdate;
|
1545
1505
|
attribute EventHandler ondownloading;
|
1546
1506
|
attribute EventHandler onprogress;
|
1547
|
-
attribute EventHandler onupdateready;
|
1548
|
-
attribute EventHandler oncached;
|
1549
|
-
attribute EventHandler onobsolete;
|
1507
|
+
attribute EventHandler onupdateready;
|
1508
|
+
attribute EventHandler oncached;
|
1509
|
+
attribute EventHandler onobsolete;
|
1510
|
+
};
|
1511
|
+
|
1512
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1513
|
+
interface NavigatorOnLine {
|
1514
|
+
readonly attribute boolean onLine;
|
1515
|
+
};
|
1516
|
+
|
1517
|
+
[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=Window,Worker]
|
1518
|
+
interface ErrorEvent : Event {
|
1519
|
+
readonly attribute DOMString message;
|
1520
|
+
readonly attribute DOMString filename;
|
1521
|
+
readonly attribute unsigned long lineno;
|
1522
|
+
readonly attribute unsigned long colno;
|
1523
|
+
readonly attribute any error;
|
1524
|
+
};
|
1525
|
+
|
1526
|
+
dictionary ErrorEventInit : EventInit {
|
1527
|
+
DOMString message;
|
1528
|
+
DOMString filename;
|
1529
|
+
unsigned long lineno;
|
1530
|
+
unsigned long colno;
|
1531
|
+
any error;
|
1532
|
+
};
|
1533
|
+
|
1534
|
+
[TreatNonCallableAsNull]
|
1535
|
+
callback EventHandlerNonNull = any (Event event);
|
1536
|
+
typedef EventHandlerNonNull? EventHandler;
|
1537
|
+
|
1538
|
+
[TreatNonCallableAsNull]
|
1539
|
+
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
|
1540
|
+
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
|
1541
|
+
|
1542
|
+
[TreatNonCallableAsNull]
|
1543
|
+
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
|
1544
|
+
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
1545
|
+
|
1546
|
+
[NoInterfaceObject]
|
1547
|
+
interface GlobalEventHandlers {
|
1548
|
+
attribute EventHandler onabort;
|
1549
|
+
attribute EventHandler onautocomplete;
|
1550
|
+
attribute EventHandler onautocompleteerror;
|
1551
|
+
attribute EventHandler onblur;
|
1552
|
+
attribute EventHandler oncancel;
|
1553
|
+
attribute EventHandler oncanplay;
|
1554
|
+
attribute EventHandler oncanplaythrough;
|
1555
|
+
attribute EventHandler onchange;
|
1556
|
+
attribute EventHandler onclick;
|
1557
|
+
attribute EventHandler onclose;
|
1558
|
+
attribute EventHandler oncontextmenu;
|
1559
|
+
attribute EventHandler oncuechange;
|
1560
|
+
attribute EventHandler ondblclick;
|
1561
|
+
attribute EventHandler ondrag;
|
1562
|
+
attribute EventHandler ondragend;
|
1563
|
+
attribute EventHandler ondragenter;
|
1564
|
+
attribute EventHandler ondragexit;
|
1565
|
+
attribute EventHandler ondragleave;
|
1566
|
+
attribute EventHandler ondragover;
|
1567
|
+
attribute EventHandler ondragstart;
|
1568
|
+
attribute EventHandler ondrop;
|
1569
|
+
attribute EventHandler ondurationchange;
|
1570
|
+
attribute EventHandler onemptied;
|
1571
|
+
attribute EventHandler onended;
|
1572
|
+
attribute OnErrorEventHandler onerror;
|
1573
|
+
attribute EventHandler onfocus;
|
1574
|
+
attribute EventHandler oninput;
|
1575
|
+
attribute EventHandler oninvalid;
|
1576
|
+
attribute EventHandler onkeydown;
|
1577
|
+
attribute EventHandler onkeypress;
|
1578
|
+
attribute EventHandler onkeyup;
|
1579
|
+
attribute EventHandler onload;
|
1580
|
+
attribute EventHandler onloadeddata;
|
1581
|
+
attribute EventHandler onloadedmetadata;
|
1582
|
+
attribute EventHandler onloadstart;
|
1583
|
+
attribute EventHandler onmousedown;
|
1584
|
+
[LenientThis] attribute EventHandler onmouseenter;
|
1585
|
+
[LenientThis] attribute EventHandler onmouseleave;
|
1586
|
+
attribute EventHandler onmousemove;
|
1587
|
+
attribute EventHandler onmouseout;
|
1588
|
+
attribute EventHandler onmouseover;
|
1589
|
+
attribute EventHandler onmouseup;
|
1590
|
+
attribute EventHandler onmousewheel;
|
1591
|
+
attribute EventHandler onpause;
|
1592
|
+
attribute EventHandler onplay;
|
1593
|
+
attribute EventHandler onplaying;
|
1594
|
+
attribute EventHandler onprogress;
|
1595
|
+
attribute EventHandler onratechange;
|
1596
|
+
attribute EventHandler onreset;
|
1597
|
+
attribute EventHandler onresize;
|
1598
|
+
attribute EventHandler onscroll;
|
1599
|
+
attribute EventHandler onseeked;
|
1600
|
+
attribute EventHandler onseeking;
|
1601
|
+
attribute EventHandler onselect;
|
1602
|
+
attribute EventHandler onshow;
|
1603
|
+
attribute EventHandler onsort;
|
1604
|
+
attribute EventHandler onstalled;
|
1605
|
+
attribute EventHandler onsubmit;
|
1606
|
+
attribute EventHandler onsuspend;
|
1607
|
+
attribute EventHandler ontimeupdate;
|
1608
|
+
attribute EventHandler ontoggle;
|
1609
|
+
attribute EventHandler onvolumechange;
|
1610
|
+
attribute EventHandler onwaiting;
|
1550
1611
|
};
|
1551
1612
|
|
1552
1613
|
[NoInterfaceObject]
|
1553
|
-
interface
|
1554
|
-
|
1614
|
+
interface WindowEventHandlers {
|
1615
|
+
attribute EventHandler onafterprint;
|
1616
|
+
attribute EventHandler onbeforeprint;
|
1617
|
+
attribute OnBeforeUnloadEventHandler onbeforeunload;
|
1618
|
+
attribute EventHandler onhashchange;
|
1619
|
+
attribute EventHandler onlanguagechange;
|
1620
|
+
attribute EventHandler onmessage;
|
1621
|
+
attribute EventHandler onoffline;
|
1622
|
+
attribute EventHandler ononline;
|
1623
|
+
attribute EventHandler onpagehide;
|
1624
|
+
attribute EventHandler onpageshow;
|
1625
|
+
attribute EventHandler onpopstate;
|
1626
|
+
attribute EventHandler onstorage;
|
1627
|
+
attribute EventHandler onunload;
|
1555
1628
|
};
|
1556
1629
|
|
1557
|
-
[
|
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;
|
1564
|
-
|
1565
|
-
[NoInterfaceObject]
|
1630
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1566
1631
|
interface WindowBase64 {
|
1567
1632
|
DOMString btoa(DOMString btoa);
|
1568
1633
|
DOMString atob(DOMString atob);
|
1569
1634
|
};
|
1570
1635
|
Window implements WindowBase64;
|
1571
1636
|
|
1572
|
-
[NoInterfaceObject]
|
1637
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1573
1638
|
interface WindowTimers {
|
1574
|
-
long setTimeout(
|
1575
|
-
long setTimeout(
|
1576
|
-
void clearTimeout(long handle);
|
1577
|
-
long setInterval(
|
1578
|
-
long setInterval(
|
1579
|
-
void clearInterval(long handle);
|
1639
|
+
long setTimeout(Function handler, optional long timeout = 0, any... arguments);
|
1640
|
+
long setTimeout(DOMString handler, optional long timeout = 0, any... arguments);
|
1641
|
+
void clearTimeout(optional long handle = 0);
|
1642
|
+
long setInterval(Function handler, optional long timeout = 0, any... arguments);
|
1643
|
+
long setInterval(DOMString handler, optional long timeout = 0, any... arguments);
|
1644
|
+
void clearInterval(optional long handle = 0);
|
1580
1645
|
};
|
1581
1646
|
Window implements WindowTimers;
|
1582
1647
|
|
1583
|
-
[
|
1584
|
-
|
1585
|
-
[NoInterfaceObject] interface WindowModal {
|
1648
|
+
[NoInterfaceObject]
|
1649
|
+
interface WindowModal {
|
1586
1650
|
readonly attribute any dialogArguments;
|
1587
|
-
attribute
|
1651
|
+
attribute any returnValue;
|
1588
1652
|
};
|
1589
1653
|
|
1590
1654
|
interface Navigator {
|
1591
1655
|
// objects implementing this interface also implement the interfaces given below
|
1592
1656
|
};
|
1593
1657
|
Navigator implements NavigatorID;
|
1658
|
+
Navigator implements NavigatorLanguage;
|
1594
1659
|
Navigator implements NavigatorOnLine;
|
1595
1660
|
Navigator implements NavigatorContentUtils;
|
1596
1661
|
Navigator implements NavigatorStorageUtils;
|
1662
|
+
Navigator implements NavigatorPlugins;
|
1597
1663
|
|
1598
|
-
[NoInterfaceObject]
|
1664
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1599
1665
|
interface NavigatorID {
|
1666
|
+
readonly attribute DOMString appCodeName; // constant "Mozilla"
|
1600
1667
|
readonly attribute DOMString appName;
|
1601
1668
|
readonly attribute DOMString appVersion;
|
1602
1669
|
readonly attribute DOMString platform;
|
1670
|
+
readonly attribute DOMString product; // constant "Gecko"
|
1671
|
+
boolean taintEnabled(); // constant false
|
1603
1672
|
readonly attribute DOMString userAgent;
|
1604
1673
|
};
|
1605
1674
|
|
1675
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1676
|
+
interface NavigatorLanguage {
|
1677
|
+
readonly attribute DOMString? language;
|
1678
|
+
readonly attribute DOMString[] languages;
|
1679
|
+
};
|
1680
|
+
|
1606
1681
|
[NoInterfaceObject]
|
1607
1682
|
interface NavigatorContentUtils {
|
1608
1683
|
// content handler registration
|
@@ -1616,143 +1691,73 @@ interface NavigatorContentUtils {
|
|
1616
1691
|
|
1617
1692
|
[NoInterfaceObject]
|
1618
1693
|
interface NavigatorStorageUtils {
|
1694
|
+
readonly attribute boolean cookieEnabled;
|
1619
1695
|
void yieldForStorageUpdates();
|
1620
1696
|
};
|
1621
1697
|
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
interface DataTransfer {
|
1628
|
-
attribute DOMString dropEffect;
|
1629
|
-
attribute DOMString effectAllowed;
|
1630
|
-
|
1631
|
-
readonly attribute DataTransferItemList items;
|
1632
|
-
|
1633
|
-
void setDragImage(Element image, long x, long y);
|
1634
|
-
void addElement(Element element);
|
1635
|
-
|
1636
|
-
/* old interface */
|
1637
|
-
readonly attribute DOMString[] types;
|
1638
|
-
DOMString getData(DOMString format);
|
1639
|
-
void setData(DOMString format, DOMString data);
|
1640
|
-
void clearData(optional DOMString format);
|
1641
|
-
readonly attribute FileList files;
|
1698
|
+
[NoInterfaceObject]
|
1699
|
+
interface NavigatorPlugins {
|
1700
|
+
readonly attribute PluginArray plugins;
|
1701
|
+
readonly attribute MimeTypeArray mimeTypes;
|
1702
|
+
readonly attribute boolean javaEnabled;
|
1642
1703
|
};
|
1643
1704
|
|
1644
|
-
interface
|
1705
|
+
interface PluginArray {
|
1706
|
+
void refresh(optional boolean reload = false);
|
1645
1707
|
readonly attribute unsigned long length;
|
1646
|
-
getter
|
1647
|
-
|
1648
|
-
void clear();
|
1649
|
-
|
1650
|
-
DataTransferItem? add(DOMString data, DOMString type);
|
1651
|
-
DataTransferItem? add(File data);
|
1652
|
-
};
|
1653
|
-
|
1654
|
-
interface DataTransferItem {
|
1655
|
-
readonly attribute DOMString kind;
|
1656
|
-
readonly attribute DOMString type;
|
1657
|
-
void getAsString(FunctionStringCallback? _callback);
|
1658
|
-
File? getAsFile();
|
1659
|
-
};
|
1660
|
-
|
1661
|
-
[Callback, NoInterfaceObject]
|
1662
|
-
interface FunctionStringCallback {
|
1663
|
-
void handleEvent(DOMString data);
|
1664
|
-
};
|
1665
|
-
|
1666
|
-
[Constructor(DOMString type, optional DragEventInit eventInitDict)]
|
1667
|
-
interface DragEvent : MouseEvent {
|
1668
|
-
readonly attribute DataTransfer? dataTransfer;
|
1669
|
-
};
|
1670
|
-
|
1671
|
-
dictionary DragEventInit : MouseEventInit {
|
1672
|
-
DataTransfer? dataTransfer;
|
1673
|
-
};
|
1674
|
-
|
1675
|
-
interface WorkerGlobalScope : EventTarget {
|
1676
|
-
readonly attribute WorkerGlobalScope self;
|
1677
|
-
readonly attribute WorkerLocation location;
|
1678
|
-
|
1679
|
-
void close();
|
1680
|
-
attribute EventHandler onerror;
|
1681
|
-
attribute EventHandler onoffline;
|
1682
|
-
attribute EventHandler ononline;
|
1708
|
+
getter Plugin? item(unsigned long index);
|
1709
|
+
getter Plugin? namedItem(DOMString name);
|
1683
1710
|
};
|
1684
|
-
WorkerGlobalScope implements WorkerUtils;
|
1685
1711
|
|
1686
|
-
interface
|
1687
|
-
|
1688
|
-
|
1712
|
+
interface MimeTypeArray {
|
1713
|
+
readonly attribute unsigned long length;
|
1714
|
+
getter MimeType? item(unsigned long index);
|
1715
|
+
getter MimeType? namedItem(DOMString name);
|
1689
1716
|
};
|
1690
1717
|
|
1691
|
-
interface
|
1718
|
+
interface Plugin {
|
1692
1719
|
readonly attribute DOMString name;
|
1693
|
-
readonly attribute
|
1694
|
-
attribute EventHandler onconnect;
|
1695
|
-
};
|
1696
|
-
|
1697
|
-
[Constructor(DOMString type, optional ErrorEventInit eventInitDict)]
|
1698
|
-
interface ErrorEvent : Event {
|
1699
|
-
readonly attribute DOMString message;
|
1720
|
+
readonly attribute DOMString description;
|
1700
1721
|
readonly attribute DOMString filename;
|
1701
|
-
readonly attribute unsigned long
|
1702
|
-
|
1703
|
-
|
1704
|
-
dictionary ErrorEventInit : EventInit {
|
1705
|
-
DOMString message;
|
1706
|
-
DOMString filename;
|
1707
|
-
unsigned long lineno;
|
1708
|
-
};
|
1709
|
-
|
1710
|
-
[NoInterfaceObject]
|
1711
|
-
interface AbstractWorker {
|
1712
|
-
attribute EventHandler onerror;
|
1713
|
-
|
1722
|
+
readonly attribute unsigned long length;
|
1723
|
+
getter MimeType? item(unsigned long index);
|
1724
|
+
getter MimeType? namedItem(DOMString name);
|
1714
1725
|
};
|
1715
1726
|
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
attribute EventHandler onmessage;
|
1727
|
+
interface MimeType {
|
1728
|
+
readonly attribute DOMString type;
|
1729
|
+
readonly attribute DOMString description;
|
1730
|
+
readonly attribute DOMString suffixes; // comma-separated
|
1731
|
+
readonly attribute Plugin enabledPlugin;
|
1722
1732
|
};
|
1723
|
-
Worker implements AbstractWorker;
|
1724
1733
|
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1734
|
+
interface External {
|
1735
|
+
void AddSearchProvider(DOMString engineURL);
|
1736
|
+
unsigned long IsSearchProviderInstalled(DOMString engineURL);
|
1728
1737
|
};
|
1729
|
-
SharedWorker implements AbstractWorker;
|
1730
1738
|
|
1731
|
-
[
|
1732
|
-
interface
|
1733
|
-
|
1734
|
-
readonly attribute
|
1739
|
+
[Exposed=Window,Worker]
|
1740
|
+
interface ImageBitmap {
|
1741
|
+
readonly attribute unsigned long width;
|
1742
|
+
readonly attribute unsigned long height;
|
1735
1743
|
};
|
1736
|
-
WorkerUtils implements WindowTimers;
|
1737
|
-
WorkerUtils implements WindowBase64;
|
1738
1744
|
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1745
|
+
typedef (HTMLImageElement or
|
1746
|
+
HTMLVideoElement or
|
1747
|
+
HTMLCanvasElement or
|
1748
|
+
Blob or
|
1749
|
+
ImageData or
|
1750
|
+
CanvasRenderingContext2D or
|
1751
|
+
ImageBitmap) ImageBitmapSource;
|
1742
1752
|
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
readonly attribute DOMString protocol;
|
1747
|
-
readonly attribute DOMString host;
|
1748
|
-
readonly attribute DOMString hostname;
|
1749
|
-
readonly attribute DOMString port;
|
1750
|
-
readonly attribute DOMString pathname;
|
1751
|
-
readonly attribute DOMString search;
|
1752
|
-
readonly attribute DOMString hash;
|
1753
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1754
|
+
interface ImageBitmapFactories {
|
1755
|
+
Promise createImageBitmap(ImageBitmapSource image, optional long sx, long sy, long sw, long sh);
|
1753
1756
|
};
|
1757
|
+
Window implements ImageBitmapFactories;
|
1758
|
+
WorkerGlobalScope implements ImageBitmapFactories;
|
1754
1759
|
|
1755
|
-
[Constructor(DOMString type, optional MessageEventInit eventInitDict)]
|
1760
|
+
[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=Window,Worker]
|
1756
1761
|
interface MessageEvent : Event {
|
1757
1762
|
readonly attribute any data;
|
1758
1763
|
readonly attribute DOMString origin;
|
@@ -1765,11 +1770,12 @@ dictionary MessageEventInit : EventInit {
|
|
1765
1770
|
any data;
|
1766
1771
|
DOMString origin;
|
1767
1772
|
DOMString lastEventId;
|
1768
|
-
|
1769
|
-
MessagePort
|
1773
|
+
DOMString channel;
|
1774
|
+
(WindowProxy or MessagePort)? source;
|
1775
|
+
sequence<MessagePort> ports;
|
1770
1776
|
};
|
1771
1777
|
|
1772
|
-
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict)]
|
1778
|
+
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=Window,Worker]
|
1773
1779
|
interface EventSource : EventTarget {
|
1774
1780
|
readonly attribute DOMString url;
|
1775
1781
|
readonly attribute boolean withCredentials;
|
@@ -1791,7 +1797,8 @@ dictionary EventSourceInit {
|
|
1791
1797
|
boolean withCredentials = false;
|
1792
1798
|
};
|
1793
1799
|
|
1794
|
-
|
1800
|
+
enum BinaryType { "blob", "arraybuffer" };
|
1801
|
+
[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=Window,Worker]
|
1795
1802
|
interface WebSocket : EventTarget {
|
1796
1803
|
readonly attribute DOMString url;
|
1797
1804
|
|
@@ -1813,13 +1820,14 @@ interface WebSocket : EventTarget {
|
|
1813
1820
|
|
1814
1821
|
// messaging
|
1815
1822
|
attribute EventHandler onmessage;
|
1816
|
-
attribute
|
1823
|
+
attribute BinaryType binaryType;
|
1817
1824
|
void send(DOMString data);
|
1818
|
-
void send(ArrayBufferView data);
|
1819
1825
|
void send(Blob data);
|
1826
|
+
void send(ArrayBuffer data);
|
1827
|
+
void send(ArrayBufferView data);
|
1820
1828
|
};
|
1821
1829
|
|
1822
|
-
[Constructor(DOMString type, optional CloseEventInit eventInitDict)]
|
1830
|
+
[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=Window,Worker]
|
1823
1831
|
interface CloseEvent : Event {
|
1824
1832
|
readonly attribute boolean wasClean;
|
1825
1833
|
readonly attribute unsigned short code;
|
@@ -1832,12 +1840,13 @@ dictionary CloseEventInit : EventInit {
|
|
1832
1840
|
DOMString reason;
|
1833
1841
|
};
|
1834
1842
|
|
1835
|
-
[Constructor]
|
1843
|
+
[Constructor, Exposed=Window,Worker]
|
1836
1844
|
interface MessageChannel {
|
1837
1845
|
readonly attribute MessagePort port1;
|
1838
1846
|
readonly attribute MessagePort port2;
|
1839
1847
|
};
|
1840
1848
|
|
1849
|
+
[Exposed=Window,Worker]
|
1841
1850
|
interface MessagePort : EventTarget {
|
1842
1851
|
void postMessage(any message, optional sequence<Transferable> transfer);
|
1843
1852
|
void start();
|
@@ -1846,12 +1855,95 @@ interface MessagePort : EventTarget {
|
|
1846
1855
|
// event handlers
|
1847
1856
|
attribute EventHandler onmessage;
|
1848
1857
|
};
|
1849
|
-
MessagePort implements Transferable;
|
1858
|
+
// MessagePort implements Transferable;
|
1859
|
+
|
1860
|
+
[Constructor, Exposed=Window,Worker]
|
1861
|
+
interface PortCollection {
|
1862
|
+
void add(MessagePort port);
|
1863
|
+
void remove(MessagePort port);
|
1864
|
+
void clear();
|
1865
|
+
void iterate(PortCollectionCallback callback);
|
1866
|
+
};
|
1867
|
+
|
1868
|
+
callback PortCollectionCallback = void (MessagePort port);
|
1869
|
+
|
1870
|
+
[Constructor(DOMString channel), Exposed=Window,Worker]
|
1871
|
+
interface BroadcastChannel : EventTarget {
|
1872
|
+
readonly attribute DOMString name;
|
1873
|
+
void postMessage(any message);
|
1874
|
+
void close();
|
1875
|
+
attribute EventHandler onmessage;
|
1876
|
+
};
|
1877
|
+
|
1878
|
+
[Exposed=Worker]
|
1879
|
+
interface WorkerGlobalScope : EventTarget {
|
1880
|
+
readonly attribute WorkerGlobalScope self;
|
1881
|
+
readonly attribute WorkerLocation location;
|
1882
|
+
|
1883
|
+
void close();
|
1884
|
+
attribute OnErrorEventHandler onerror;
|
1885
|
+
attribute EventHandler onlanguagechange;
|
1886
|
+
attribute EventHandler onoffline;
|
1887
|
+
attribute EventHandler ononline;
|
1888
|
+
|
1889
|
+
// also has additional members in a partial interface
|
1890
|
+
};
|
1891
|
+
|
1892
|
+
[Global=Worker,DedicatedWorker]
|
1893
|
+
/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
|
1894
|
+
void postMessage(any message, optional sequence<Transferable> transfer);
|
1895
|
+
attribute EventHandler onmessage;
|
1896
|
+
};
|
1897
|
+
|
1898
|
+
[Global=Worker,SharedWorker]
|
1899
|
+
/*sealed*/ interface SharedWorkerGlobalScope : WorkerGlobalScope {
|
1900
|
+
readonly attribute DOMString name;
|
1901
|
+
readonly attribute ApplicationCache applicationCache;
|
1902
|
+
attribute EventHandler onconnect;
|
1903
|
+
};
|
1904
|
+
|
1905
|
+
[NoInterfaceObject, Exposed=Window,Worker]
|
1906
|
+
interface AbstractWorker {
|
1907
|
+
attribute EventHandler onerror;
|
1908
|
+
};
|
1909
|
+
|
1910
|
+
[Constructor(DOMString scriptURL), Exposed=Window,Worker]
|
1911
|
+
interface Worker : EventTarget {
|
1912
|
+
void terminate();
|
1913
|
+
|
1914
|
+
void postMessage(any message, optional sequence<Transferable> transfer);
|
1915
|
+
attribute EventHandler onmessage;
|
1916
|
+
};
|
1917
|
+
Worker implements AbstractWorker;
|
1918
|
+
|
1919
|
+
[Constructor(DOMString scriptURL, optional DOMString name), Exposed=Window,Worker]
|
1920
|
+
interface SharedWorker : EventTarget {
|
1921
|
+
readonly attribute MessagePort port;
|
1922
|
+
};
|
1923
|
+
SharedWorker implements AbstractWorker;
|
1924
|
+
|
1925
|
+
[Exposed=Worker]
|
1926
|
+
partial interface WorkerGlobalScope {
|
1927
|
+
void importScripts(DOMString... urls);
|
1928
|
+
readonly attribute WorkerNavigator navigator;
|
1929
|
+
};
|
1930
|
+
WorkerGlobalScope implements WindowTimers;
|
1931
|
+
WorkerGlobalScope implements WindowBase64;
|
1932
|
+
|
1933
|
+
[Exposed=Worker]
|
1934
|
+
interface WorkerNavigator {};
|
1935
|
+
WorkerNavigator implements NavigatorID;
|
1936
|
+
WorkerNavigator implements NavigatorLanguage;
|
1937
|
+
WorkerNavigator implements NavigatorOnLine;
|
1938
|
+
|
1939
|
+
[Exposed=Worker]
|
1940
|
+
interface WorkerLocation { };
|
1941
|
+
WorkerLocation implements URLUtilsReadOnly;
|
1850
1942
|
|
1851
1943
|
interface Storage {
|
1852
1944
|
readonly attribute unsigned long length;
|
1853
1945
|
DOMString? key(unsigned long index);
|
1854
|
-
getter DOMString getItem(DOMString key);
|
1946
|
+
getter DOMString? getItem(DOMString key);
|
1855
1947
|
setter creator void setItem(DOMString key, DOMString value);
|
1856
1948
|
deleter void removeItem(DOMString key);
|
1857
1949
|
void clear();
|
@@ -1895,7 +1987,7 @@ interface HTMLAppletElement : HTMLElement {
|
|
1895
1987
|
attribute DOMString height;
|
1896
1988
|
attribute unsigned long hspace;
|
1897
1989
|
attribute DOMString name;
|
1898
|
-
attribute DOMString _object; // the underscore is not part of the identifier
|
1990
|
+
attribute DOMString _object; // the underscore is not part of the identifier
|
1899
1991
|
attribute unsigned long vspace;
|
1900
1992
|
attribute DOMString width;
|
1901
1993
|
};
|
@@ -1924,25 +2016,8 @@ interface HTMLMarqueeElement : HTMLElement {
|
|
1924
2016
|
interface HTMLFrameSetElement : HTMLElement {
|
1925
2017
|
attribute DOMString cols;
|
1926
2018
|
attribute DOMString rows;
|
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;
|
1945
2019
|
};
|
2020
|
+
HTMLFrameSetElement implements WindowEventHandlers;
|
1946
2021
|
|
1947
2022
|
interface HTMLFrameElement : HTMLElement {
|
1948
2023
|
attribute DOMString name;
|
@@ -1970,12 +2045,6 @@ partial interface HTMLAreaElement {
|
|
1970
2045
|
attribute boolean noHref;
|
1971
2046
|
};
|
1972
2047
|
|
1973
|
-
interface HTMLBaseFontElement : HTMLElement {
|
1974
|
-
attribute DOMString color;
|
1975
|
-
attribute DOMString face;
|
1976
|
-
attribute long size;
|
1977
|
-
};
|
1978
|
-
|
1979
2048
|
partial interface HTMLBodyElement {
|
1980
2049
|
[TreatNullAs=EmptyString] attribute DOMString text;
|
1981
2050
|
[TreatNullAs=EmptyString] attribute DOMString link;
|
@@ -2021,7 +2090,7 @@ partial interface HTMLEmbedElement {
|
|
2021
2090
|
interface HTMLFontElement : HTMLElement {
|
2022
2091
|
[TreatNullAs=EmptyString] attribute DOMString color;
|
2023
2092
|
attribute DOMString face;
|
2024
|
-
attribute DOMString size;
|
2093
|
+
attribute DOMString size;
|
2025
2094
|
};
|
2026
2095
|
|
2027
2096
|
partial interface HTMLHeadingElement {
|
@@ -2052,6 +2121,7 @@ partial interface HTMLIFrameElement {
|
|
2052
2121
|
|
2053
2122
|
partial interface HTMLImageElement {
|
2054
2123
|
attribute DOMString name;
|
2124
|
+
attribute DOMString lowsrc;
|
2055
2125
|
attribute DOMString align;
|
2056
2126
|
attribute unsigned long hspace;
|
2057
2127
|
attribute unsigned long vspace;
|
@@ -2125,6 +2195,7 @@ partial interface HTMLScriptElement {
|
|
2125
2195
|
|
2126
2196
|
partial interface HTMLTableElement {
|
2127
2197
|
attribute DOMString align;
|
2198
|
+
attribute DOMString border;
|
2128
2199
|
attribute DOMString frame;
|
2129
2200
|
attribute DOMString rules;
|
2130
2201
|
attribute DOMString summary;
|
@@ -2143,7 +2214,6 @@ partial interface HTMLTableSectionElement {
|
|
2143
2214
|
};
|
2144
2215
|
|
2145
2216
|
partial interface HTMLTableCellElement {
|
2146
|
-
attribute DOMString abbr;
|
2147
2217
|
attribute DOMString align;
|
2148
2218
|
attribute DOMString axis;
|
2149
2219
|
attribute DOMString height;
|
@@ -2157,6 +2227,10 @@ partial interface HTMLTableCellElement {
|
|
2157
2227
|
[TreatNullAs=EmptyString] attribute DOMString bgColor;
|
2158
2228
|
};
|
2159
2229
|
|
2230
|
+
partial interface HTMLTableDataCellElement {
|
2231
|
+
attribute DOMString abbr;
|
2232
|
+
};
|
2233
|
+
|
2160
2234
|
partial interface HTMLTableRowElement {
|
2161
2235
|
attribute DOMString align;
|
2162
2236
|
attribute DOMString ch;
|
@@ -2182,6 +2256,13 @@ partial interface Document {
|
|
2182
2256
|
readonly attribute HTMLCollection applets;
|
2183
2257
|
|
2184
2258
|
void clear();
|
2259
|
+
void captureEvents();
|
2260
|
+
void releaseEvents();
|
2185
2261
|
|
2186
2262
|
readonly attribute HTMLAllCollection all;
|
2187
|
-
};
|
2263
|
+
};
|
2264
|
+
|
2265
|
+
partial interface Window {
|
2266
|
+
void captureEvents();
|
2267
|
+
void releaseEvents();
|
2268
|
+
};
|