forked from speced/respec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webidl.html
464 lines (459 loc) · 13.9 KB
/
webidl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset='utf-8'/>
<title>WebIDL Tests</title>
<script class='remove'>
document.write(
"<scr" + "ipt " +
((typeof window.callPhantom === 'function') ?
"src='/builds/respec-w3c-common.js'" :
"src='/js/require.js' data-main='/js/profile-w3c-common'") +
" class='remove'></scr"+"ipt>"
);
</script>
<script class='remove'>
var respecConfig = {
specStatus: "ED"
, shortName: "webidl"
, editors: [{ name: "Robin Berjon", url: "http://berjon.com/" }]
, wg: "ReSpec Hackin' Gang"
, wgURI: "http://darobin.github.com/respec"
, wgPublicList: "none"
, wgPatentURI: "XXX"
, edDraftURI: "http://darobin.github.com/respec"
};
</script>
</head>
<body>
<section id='abstract'>
<p>
This fake spec tried to exercise all aspects of WebIDL so as to do regression testing in this
complex piece of code.
</p>
</section>
<section id='sotd'>
<p>
CUSTOM PARAGRAPH
</p>
</section>
<section>
<h2>Unsupported</h2>
<p>
The following aspects of WebIDL are not currently supported and are not yet tested for:
</p>
<ul>
<li>
Names that begin with <code>_</code> in the IDL must drop the leading <code>_</code> for
their real name.
</li>
<li>
Static, inherit, stringifier attributes.
</li>
<li>Static operations</li>
<li>Default arguments</li>
<li>IDL wrapping</li>
<li>Special operations</li>
<li>Union types</li>
<li>partial dictionaries</li>
</ul>
<p>
Support for these features will likely be added later.
</p>
<p>
The following features are supposedly supported but actually buggy:
</p>
<ul>
<li><em>list currently empty</em></li>
</ul>
<p>
Things that still need to be done:
</p>
<ul>
<li>Check that [], sequence, Promise, ?, and other such bothersome types are tested everywhere</li>
</ul>
</section>
<section>
<h2>Interfaces</h2>
<p>
Basic interface.
</p>
<dl id='if-basic' class='idl' title='interface SuperStar'></dl>
<p>
Interface with extended attribute.
</p>
<dl id='if-extended-attribute' class='idl' title='[Something, Constructor()] interface SuperStar'></dl>
<p>
Interface with inheritance.
</p>
<dl id='if-inheritance' class='idl' title='interface SuperStar : HyperStar'></dl>
<p>
Partial interface .
</p>
<dl id='if-partial' class='idl' title='partial interface SuperStar'></dl>
<p>
Callback interface .
</p>
<dl id='if-callback' class='idl' title='callback interface SuperStar'></dl>
</section>
<section>
<h2>Constructors</h2>
<p>
Constructors on interfaces
</p>
<dl id='ctor-basic' class='idl' title='[Something] interface SuperStar'>
<dt>Constructor()</dt>
<dd>Constructor without parameters.</dd>
<dt>Constructor(boolean bar, sequence<double> foo, Promise<double> blah)</dt>
<dd>Constructor with parameters.</dd>
</dl>
<dl id='ctor-noea' class='idl' title='interface SuperStar'>
<dt>Constructor()</dt>
<dd></dd>
</dl>
</section>
<section>
<h2>NamedConstructors</h2>
<p>
NamedConstructors on interfaces
</p>
<dl id='namedctor-basic' class='idl' title='[Something] interface SuperStar'>
<dt>NamedConstructor=Sun()</dt>
<dd>NamedConstructor without parameters.</dd>
<dt>NamedConstructor=Sun(boolean bar, Date[][][] foo)</dt>
<dd>NamedConstructor with parameters.</dd>
</dl>
</section>
<section>
<h2>Constants</h2>
<p>
All constants and some type testing
</p>
<dl id='const-basic' class='idl' title='interface SuperStar'>
<dt>const boolean test = true</dt>
<dd>1</dd>
<dt>const byte bite = 8</dt>
<dd>2</dd>
<dt>const octet eight = 7</dt>
<dd>3</dd>
<dt>const short small = 42</dt>
<dd>4</dd>
<dt>const unsigned short shortish = 250</dt>
<dd>5</dd>
<dt>const long notSoLong = 99999</dt>
<dd>6</dd>
<dt>const unsigned long somewhatLong = 9999999</dt>
<dd>7</dd>
<dt>const long long veryLong = 9999999999999</dt>
<dd>8</dd>
<dt>const unsigned long long soLong = 99999999999999999</dt>
<dd>9</dd>
<dt>const float ationDevice = 4.2</dt>
<dd>10</dd>
<dt>const unrestricted float buoy = 4.2222222222</dt>
<dd>11</dd>
<dt>const double twice = 4.222222222</dt>
<dd>12</dd>
<dt>const unrestricted double rambaldi = 47.0</dt>
<dd>13</dd>
<dt>const boolean? why = false</dt>
<dd>14</dd>
<dt>const boolean? notSo = null</dt>
<dd>15</dd>
<dt>const short inf = Infinity</dt>
<dd>16</dd>
<dt>const short mininf = -Infinity</dt>
<dd>17</dd>
<dt>const short cheese = NaN</dt>
<dd>18</dd>
<dt>[Something] const short extAttr = NaN</dt>
<dd>18</dd>
</dl>
</section>
<section>
<h2>Attributes</h2>
<p>
Basic attributes testing.
</p>
<dl id='attr-basic' class='idl' title='interface SuperStar'>
<dt>attribute DOMString regular</dt>
<dd>1</dd>
<dt>readonly attribute DOMString ro</dt>
<dd>2</dd>
<dt>readonly attribute DOMString _readonly</dt>
<dd>2.2</dd>
<dt>inherit attribute DOMString in</dt>
<dd>2.5</dd>
<dt>stringifier attribute DOMString st</dt>
<dd>2.7</dd>
<dt>[Something] readonly attribute DOMString ext</dt>
<dd>3</dd>
<dt>attribute sequence<Date> dates</dt>
<dd>3.5</dd>
<dt>attribute Promise<DOMString> operation</dt>
<dd>4.0</dd>
<dt>attribute sequence<Promise<Superstar>> wouldBeStars</dt>
<dd>4.5</dd>
<dt>static readonly attribute FrozenArray<RTCIceServer> xdefaultIceServers</dt>
<dd>4.6</dd>
<!-- <dt>static attribute DOMString unmovable</dt>
<dd>3</dd>
<dt>stringifier attribute DOMString asString</dt>
<dd>4</dd>
<dt>inherit attribute DOMString css</dt>
<dd>5</dd>
<dt>static inherit readonly attribute DOMString everything</dt>
<dd>6</dd>
<dt>stringifier inherit readonly attribute DOMString all</dt>
<dd>7</dd>-->
</dl>
</section>
<section>
<h2>Operations</h2>
<p>
Basic operations testing.
</p>
<!--
getter, setter, creator, deleter, legacycaller, stringifier, serilizer
static
specials don't necessarily have an indentifier
-->
<dl id='meth-basic' class='idl' title='interface SuperStar'>
<dt>void basic()</dt>
<dd>1</dd>
<dt>[Something] void ext()</dt>
<dd>2</dd>
<dt>unsigned long long ull()</dt>
<dd>3</dd>
<dt>SuperStar? ull()</dt>
<dd>3.5</dd>
<dt>SuperStar[][][][] paramed()</dt>
<dd>
4
<dl class='parameters'>
<dt>SuperStar[][][] one</dt>
<dd>
4.1
</dd>
<dt>[ExtAttrs] ByteString? ext</dt>
<dd>
4.1
</dd>
<dt>optional short maybe</dt>
<dd>
4.2
</dd>
<dt>short[] shorts</dt>
<dd>
4.3
</dd>
<dt>short[][][][] hypercubes</dt>
<dd>
4.3
</dd>
<dt>optional short defaulted = 3.5</dt>
<dd>
4.3
</dd>
<dt>DOMString defaulted2 = "one"</dt>
<dd>
4.3
</dd>
<dt>short... variable</dt>
<dd>
4.last
</dd>
</dl>
</dd>
<!--
<dt>getter float ()</dt>
<dd>5</dd>
<dt>getter float withName ()</dt>
<dd>6</dd>
<dt>setter void ()</dt>
<dd>7</dd>
<dt>setter void named ()</dt>
<dd>8</dd>
... and other special operations
-->
</dl>
</section>
<section>
<h2>Serializer</h2>
<dl id='serializer-map' class='idl' title='interface SuperStar'>
<dt>attribute DOMString foo</dt>
<dt>attribute DOMString bar</dt>
<dt>serializer = { foo, bar }</dt>
</dl>
</section>
<section>
<h2>Comments</h2>
<dl id="comments-basic" class='idl' title='interface SuperStar'>
<dt>// This is a comment</dt>
<dd></dd>
<dt>// over two lines.</dt>
<dd></dd>
</dl>
</section>
<section>
<h2>Dictionaries</h2>
<p>
Basic dictionary.
</p>
<dl id='dict-basic' class='idl' title='dictionary SuperStar'></dl>
<p>
Inheriting dictionary.
</p>
<dl id='dict-inherit' class='idl' title='dictionary SuperStar : HyperStar'></dl>
<p>
Data in dictionary.
</p>
<dl id='dict-fields' class='idl' title='dictionary SuperStar'>
<dt>DOMString value</dt>
<dd>1</dd>
<dt>DOMString? nullable</dt>
<dd>2</dd>
<dt>[Something]float ext</dt>
<dd>3</dd>
<dt>unsigned long long longLong</dt>
<dd>4</dd>
<dt>boolean test = true</dt>
<dd>5</dd>
<dt>byte little = 2</dt>
<dd>7</dd>
<dt>byte big = Infinity</dt>
<dd>8</dd>
<dt>byte cheese = NaN</dt>
<dd>9</dd>
<dt>required sequence<DOMString> names</dt>
<dd>10</dd>
<dt>DOMString blah = "blah blah"</dt>
<dd>11</dd>
</dl>
</section>
<section>
<h2>Exceptions</h2>
<p>
Basic exception.
</p>
<dl id='ex-basic' class='idl' title='exception SuperStar'></dl>
<p>
Inheriting exception.
</p>
<dl id='ex-inherit' class='idl' title='exception SuperStar : HyperStar'></dl>
<p>
Exception with content.
</p>
<dl id='ex-fields' class='idl' title='exception SuperStar'>
<dt>[Something]const SuperStar value = 42</dt>
<dd>1</dd>
<dt>SuperStar? message</dt>
<dd>2</dd>
<dt>sequence<SuperStar> floats</dt>
<dd>3</dd>
<dt>SuperStar[][] numbers</dt>
<dd>4</dd>
<dt>Promise<SuperStar> stars</dt>
<dd>5</dd>
</dl>
</section>
<section>
<h2>Enumerations</h2>
<p>
Basic enumeration.
</p>
<dl id='enum-basic' class='idl' title='enum SuperStar'>
<dt>one</dt>
<dd>1</dd>
<dt>two</dt>
<dd>2</dd>
<dt>three</dt>
<dd>3</dd>
<dt>white space</dt>
<dd>4</dd>
</dl>
<!--
XXX extattr?
-->
</section>
<section>
<h2>Callbacks</h2>
<p>
Basic callback.
</p>
<dl id='cb-basic' class='idl' title='callback SuperStar = void'></dl>
<p>
Less basic callback.
</p>
<dl id='cb-less-basic' class='idl' title='callback SuperStar = unsigned long long?'>
<dt>optional any value</dt>
<dd>1</dd>
</dl>
<!--
XXX extattr?
-->
</section>
<section>
<h2>Typedefs</h2>
<p>
Basic typedef.
</p>
<div id='td-basic' class='idl' title='typedef DOMString string'></div>
<p>
Less basic typedef.
</p>
<div id='td-less-basic' class='idl' title='typedef [Something] unsigned long long? sth'></div>
</section>
<section>
<h2>Implements</h2>
<p>
Basic implements.
</p>
<div id='impl-basic' class='idl' title='Window implements Breakable'></div>
<p>
Less basic implements.
</p>
<div id='impl-less-basic' class='idl' title='[Something]Window implements Breakable'></div>
</section>
<section>
<h2>maplike</h2>
<dl id="if-maplike" class="idl" title="interface SuperStar">
<dt>void foo()</dt>
<dd>foo description</dd>
<dt>maplike<DOMString,SuperStar></dt>
<dd>This is a maplike interface whose value is a SuperStar instance and key is its ID.</dd>
<dt>attribute DOMString bar</dt>
<dd>bar description</dd>
</dl>
</section>
<section>
<h2>readonly maplike</h2>
<dl id="if-readonly-maplike" class="idl" title="interface SuperStar">
<dt>void foo()</dt>
<dd>foo description</dd>
<dt>readonly maplike<DOMString,SuperStar></dt>
<dd>This is a readonly maplike interface whose value is a SuperStar instance and key is its ID.</dd>
<dt>attribute DOMString bar</dt>
<dd>bar description</dd>
</dl>
</section>
<section>
<h2>iterable</h2>
<dl id="if-iterable" class="idl" title="interface AnIterableInterface">
<dt>iterable<DOMString></dt>
<dd>The values to iterate over are a snapshot of the names of the mome raths, in lexical order.</dd>
<dt>attribute DOMString foo</dt>
<dt>attribute DOMString bar</dt>
</dl>
</section>
<section>
<h2>iterable-pairs</h2>
<dl id="if-iterable-pairs" class="idl" title="interface AnIterablePairInterface">
<dt>iterable<DOMString,SuperStar></dt>
<dd>The key value pairs to iterate over are a snapshot of the names and mimsy states of the mome raths, in lexical order of name.</dd>
<dt>attribute DOMString foo</dt>
<dt>attribute DOMString bar</dt>
</dl>
</section>
</body>
</html>