1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 [LegacyFactoryFunction=Example,
7 LegacyFactoryFunction=Example(DOMString str),
8 LegacyFactoryFunction=Example2(DictForConstructor dict, any any1, object obj1,
9 object? obj2, sequence<Dict> seq, optional any any2,
10 optional object obj3, optional object? obj4),
11 LegacyFactoryFunction=Example2((long or record<DOMString, any>) arg1),
13 interface TestExampleInterface {
15 constructor(DOMString str);
16 constructor(unsigned long num, boolean? boolArg);
17 constructor(TestInterface? iface);
18 constructor(unsigned long arg1, TestInterface iface);
19 constructor(ArrayBuffer arrayBuf);
20 constructor(Uint8Array typedArr);
21 // constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3);
24 // XXXbz add tests for throwing versions of all the integer stuff
25 readonly attribute byte readonlyByte;
26 attribute byte writableByte;
27 undefined passByte(byte arg);
29 undefined passOptionalByte(optional byte arg);
30 undefined passOptionalByteBeforeRequired(optional byte arg1, byte arg2);
31 undefined passOptionalByteWithDefault(optional byte arg = 0);
32 undefined passOptionalByteWithDefaultBeforeRequired(optional byte arg1 = 0, byte arg2);
33 undefined passNullableByte(byte? arg);
34 undefined passOptionalNullableByte(optional byte? arg);
35 undefined passVariadicByte(byte... arg);
37 readonly attribute byte cachedByte;
38 [StoreInSlot, Constant]
39 readonly attribute byte cachedConstantByte;
41 attribute byte cachedWritableByte;
43 attribute byte sideEffectFreeByte;
44 [Affects=Nothing, DependsOn=DOMState]
45 attribute byte domDependentByte;
46 [Affects=Nothing, DependsOn=Nothing]
47 readonly attribute byte constantByte;
48 [DependsOn=DeviceState, Affects=Nothing]
49 readonly attribute byte deviceStateDependentByte;
51 byte returnByteSideEffectFree();
52 [Affects=Nothing, DependsOn=DOMState]
53 byte returnDOMDependentByte();
54 [Affects=Nothing, DependsOn=Nothing]
55 byte returnConstantByte();
56 [DependsOn=DeviceState, Affects=Nothing]
57 byte returnDeviceStateDependentByte();
59 readonly attribute short readonlyShort;
60 attribute short writableShort;
61 undefined passShort(short arg);
63 undefined passOptionalShort(optional short arg);
64 undefined passOptionalShortWithDefault(optional short arg = 5);
66 readonly attribute long readonlyLong;
67 attribute long writableLong;
68 undefined passLong(long arg);
70 undefined passOptionalLong(optional long arg);
71 undefined passOptionalLongWithDefault(optional long arg = 7);
73 readonly attribute long long readonlyLongLong;
74 attribute long long writableLongLong;
75 undefined passLongLong(long long arg);
76 long long receiveLongLong();
77 undefined passOptionalLongLong(optional long long arg);
78 undefined passOptionalLongLongWithDefault(optional long long arg = -12);
80 readonly attribute octet readonlyOctet;
81 attribute octet writableOctet;
82 undefined passOctet(octet arg);
84 undefined passOptionalOctet(optional octet arg);
85 undefined passOptionalOctetWithDefault(optional octet arg = 19);
87 readonly attribute unsigned short readonlyUnsignedShort;
88 attribute unsigned short writableUnsignedShort;
89 undefined passUnsignedShort(unsigned short arg);
90 unsigned short receiveUnsignedShort();
91 undefined passOptionalUnsignedShort(optional unsigned short arg);
92 undefined passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2);
94 readonly attribute unsigned long readonlyUnsignedLong;
95 attribute unsigned long writableUnsignedLong;
96 undefined passUnsignedLong(unsigned long arg);
97 unsigned long receiveUnsignedLong();
98 undefined passOptionalUnsignedLong(optional unsigned long arg);
99 undefined passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6);
101 readonly attribute unsigned long long readonlyUnsignedLongLong;
102 attribute unsigned long long writableUnsignedLongLong;
103 undefined passUnsignedLongLong(unsigned long long arg);
104 unsigned long long receiveUnsignedLongLong();
105 undefined passOptionalUnsignedLongLong(optional unsigned long long arg);
106 undefined passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17);
108 attribute float writableFloat;
109 attribute unrestricted float writableUnrestrictedFloat;
110 attribute float? writableNullableFloat;
111 attribute unrestricted float? writableNullableUnrestrictedFloat;
112 attribute double writableDouble;
113 attribute unrestricted double writableUnrestrictedDouble;
114 attribute double? writableNullableDouble;
115 attribute unrestricted double? writableNullableUnrestrictedDouble;
116 undefined passFloat(float arg1, unrestricted float arg2,
117 float? arg3, unrestricted float? arg4,
118 double arg5, unrestricted double arg6,
119 double? arg7, unrestricted double? arg8,
120 sequence<float> arg9, sequence<unrestricted float> arg10,
121 sequence<float?> arg11, sequence<unrestricted float?> arg12,
122 sequence<double> arg13, sequence<unrestricted double> arg14,
123 sequence<double?> arg15, sequence<unrestricted double?> arg16);
125 undefined passLenientFloat(float arg1, unrestricted float arg2,
126 float? arg3, unrestricted float? arg4,
127 double arg5, unrestricted double arg6,
128 double? arg7, unrestricted double? arg8,
129 sequence<float> arg9,
130 sequence<unrestricted float> arg10,
131 sequence<float?> arg11,
132 sequence<unrestricted float?> arg12,
133 sequence<double> arg13,
134 sequence<unrestricted double> arg14,
135 sequence<double?> arg15,
136 sequence<unrestricted double?> arg16);
138 attribute float lenientFloatAttr;
140 attribute double lenientDoubleAttr;
142 // Castable interface types
143 // XXXbz add tests for throwing versions of all the castable interface stuff
144 TestInterface receiveSelf();
145 TestInterface? receiveNullableSelf();
146 TestInterface receiveWeakSelf();
147 TestInterface? receiveWeakNullableSelf();
148 undefined passSelf(TestInterface arg);
149 undefined passNullableSelf(TestInterface? arg);
150 attribute TestInterface nonNullSelf;
151 attribute TestInterface? nullableSelf;
153 readonly attribute TestInterface cachedSelf;
154 // Optional arguments
155 undefined passOptionalSelf(optional TestInterface? arg);
156 undefined passOptionalNonNullSelf(optional TestInterface arg);
157 undefined passOptionalSelfWithDefault(optional TestInterface? arg = null);
159 // Non-wrapper-cache interface types
161 TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
163 TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
165 sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
167 sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
169 sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
171 sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
173 // External interface types
174 TestExternalInterface receiveExternal();
175 TestExternalInterface? receiveNullableExternal();
176 TestExternalInterface receiveWeakExternal();
177 TestExternalInterface? receiveWeakNullableExternal();
178 undefined passExternal(TestExternalInterface arg);
179 undefined passNullableExternal(TestExternalInterface? arg);
180 attribute TestExternalInterface nonNullExternal;
181 attribute TestExternalInterface? nullableExternal;
182 // Optional arguments
183 undefined passOptionalExternal(optional TestExternalInterface? arg);
184 undefined passOptionalNonNullExternal(optional TestExternalInterface arg);
185 undefined passOptionalExternalWithDefault(optional TestExternalInterface? arg = null);
187 // Callback interface types
188 TestCallbackInterface receiveCallbackInterface();
189 TestCallbackInterface? receiveNullableCallbackInterface();
190 TestCallbackInterface receiveWeakCallbackInterface();
191 TestCallbackInterface? receiveWeakNullableCallbackInterface();
192 undefined passCallbackInterface(TestCallbackInterface arg);
193 undefined passNullableCallbackInterface(TestCallbackInterface? arg);
194 attribute TestCallbackInterface nonNullCallbackInterface;
195 attribute TestCallbackInterface? nullableCallbackInterface;
196 // Optional arguments
197 undefined passOptionalCallbackInterface(optional TestCallbackInterface? arg);
198 undefined passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg);
199 undefined passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null);
203 readonly attribute sequence<long> readonlySequence;
205 readonly attribute sequence<Dict> readonlySequenceOfDictionaries;
207 readonly attribute sequence<Dict>? readonlyNullableSequenceOfDictionaries;
208 [Cached, Pure, Frozen]
209 readonly attribute sequence<long> readonlyFrozenSequence;
210 [Cached, Pure, Frozen]
211 readonly attribute sequence<long>? readonlyFrozenNullableSequence;
212 sequence<long> receiveSequence();
213 sequence<long>? receiveNullableSequence();
214 sequence<long?> receiveSequenceOfNullableInts();
215 sequence<long?>? receiveNullableSequenceOfNullableInts();
216 undefined passSequence(sequence<long> arg);
217 undefined passNullableSequence(sequence<long>? arg);
218 undefined passSequenceOfNullableInts(sequence<long?> arg);
219 undefined passOptionalSequenceOfNullableInts(optional sequence<long?> arg);
220 undefined passOptionalNullableSequenceOfNullableInts(optional sequence<long?>? arg);
221 sequence<TestInterface> receiveCastableObjectSequence();
222 sequence<TestCallbackInterface> receiveCallbackObjectSequence();
223 sequence<TestInterface?> receiveNullableCastableObjectSequence();
224 sequence<TestCallbackInterface?> receiveNullableCallbackObjectSequence();
225 sequence<TestInterface>? receiveCastableObjectNullableSequence();
226 sequence<TestInterface?>? receiveNullableCastableObjectNullableSequence();
227 sequence<TestInterface> receiveWeakCastableObjectSequence();
228 sequence<TestInterface?> receiveWeakNullableCastableObjectSequence();
229 sequence<TestInterface>? receiveWeakCastableObjectNullableSequence();
230 sequence<TestInterface?>? receiveWeakNullableCastableObjectNullableSequence();
231 undefined passCastableObjectSequence(sequence<TestInterface> arg);
232 undefined passNullableCastableObjectSequence(sequence<TestInterface?> arg);
233 undefined passCastableObjectNullableSequence(sequence<TestInterface>? arg);
234 undefined passNullableCastableObjectNullableSequence(sequence<TestInterface?>? arg);
235 undefined passOptionalSequence(optional sequence<long> arg);
236 undefined passOptionalSequenceWithDefaultValue(optional sequence<long> arg = []);
237 undefined passOptionalNullableSequence(optional sequence<long>? arg);
238 undefined passOptionalNullableSequenceWithDefaultValue(optional sequence<long>? arg = null);
239 undefined passOptionalNullableSequenceWithDefaultValue2(optional sequence<long>? arg = []);
240 undefined passOptionalObjectSequence(optional sequence<TestInterface> arg);
241 undefined passExternalInterfaceSequence(sequence<TestExternalInterface> arg);
242 undefined passNullableExternalInterfaceSequence(sequence<TestExternalInterface?> arg);
244 sequence<DOMString> receiveStringSequence();
245 undefined passStringSequence(sequence<DOMString> arg);
247 sequence<ByteString> receiveByteStringSequence();
248 undefined passByteStringSequence(sequence<ByteString> arg);
250 sequence<UTF8String> receiveUTF8StringSequence();
251 undefined passUTF8StringSequence(sequence<UTF8String> arg);
253 sequence<any> receiveAnySequence();
254 sequence<any>? receiveNullableAnySequence();
255 //XXXbz No support for sequence of sequence return values yet.
256 //sequence<sequence<any>> receiveAnySequenceSequence();
258 sequence<object> receiveObjectSequence();
259 sequence<object?> receiveNullableObjectSequence();
261 undefined passSequenceOfSequences(sequence<sequence<long>> arg);
262 undefined passSequenceOfSequencesOfSequences(sequence<sequence<sequence<long>>> arg);
263 //XXXbz No support for sequence of sequence return values yet.
264 //sequence<sequence<long>> receiveSequenceOfSequences();
267 undefined passRecord(record<DOMString, long> arg);
268 undefined passNullableRecord(record<DOMString, long>? arg);
269 undefined passRecordOfNullableInts(record<DOMString, long?> arg);
270 undefined passOptionalRecordOfNullableInts(optional record<DOMString, long?> arg);
271 undefined passOptionalNullableRecordOfNullableInts(optional record<DOMString, long?>? arg);
272 undefined passCastableObjectRecord(record<DOMString, TestInterface> arg);
273 undefined passNullableCastableObjectRecord(record<DOMString, TestInterface?> arg);
274 undefined passCastableObjectNullableRecord(record<DOMString, TestInterface>? arg);
275 undefined passNullableCastableObjectNullableRecord(record<DOMString, TestInterface?>? arg);
276 undefined passOptionalRecord(optional record<DOMString, long> arg);
277 undefined passOptionalNullableRecord(optional record<DOMString, long>? arg);
278 undefined passOptionalNullableRecordWithDefaultValue(optional record<DOMString, long>? arg = null);
279 undefined passOptionalObjectRecord(optional record<DOMString, TestInterface> arg);
280 undefined passExternalInterfaceRecord(record<DOMString, TestExternalInterface> arg);
281 undefined passNullableExternalInterfaceRecord(record<DOMString, TestExternalInterface?> arg);
282 undefined passStringRecord(record<DOMString, DOMString> arg);
283 undefined passByteStringRecord(record<DOMString, ByteString> arg);
284 undefined passUTF8StringRecord(record<DOMString, UTF8String> arg);
285 undefined passRecordOfRecords(record<DOMString, record<DOMString, long>> arg);
286 record<DOMString, long> receiveRecord();
287 record<DOMString, long>? receiveNullableRecord();
288 record<DOMString, long?> receiveRecordOfNullableInts();
289 record<DOMString, long?>? receiveNullableRecordOfNullableInts();
290 //XXXbz No support for record of records return values yet.
291 //record<DOMString, record<DOMString, long>> receiveRecordOfRecords();
292 record<DOMString, any> receiveAnyRecord();
295 undefined passArrayBuffer(ArrayBuffer arg);
296 undefined passNullableArrayBuffer(ArrayBuffer? arg);
297 undefined passOptionalArrayBuffer(optional ArrayBuffer arg);
298 undefined passOptionalNullableArrayBuffer(optional ArrayBuffer? arg);
299 undefined passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null);
300 undefined passArrayBufferView(ArrayBufferView arg);
301 undefined passInt8Array(Int8Array arg);
302 undefined passInt16Array(Int16Array arg);
303 undefined passInt32Array(Int32Array arg);
304 undefined passUint8Array(Uint8Array arg);
305 undefined passUint16Array(Uint16Array arg);
306 undefined passUint32Array(Uint32Array arg);
307 undefined passUint8ClampedArray(Uint8ClampedArray arg);
308 undefined passFloat32Array(Float32Array arg);
309 undefined passFloat64Array(Float64Array arg);
310 undefined passSequenceOfArrayBuffers(sequence<ArrayBuffer> arg);
311 undefined passSequenceOfNullableArrayBuffers(sequence<ArrayBuffer?> arg);
312 undefined passRecordOfArrayBuffers(record<DOMString, ArrayBuffer> arg);
313 undefined passRecordOfNullableArrayBuffers(record<DOMString, ArrayBuffer?> arg);
314 undefined passVariadicTypedArray(Float32Array... arg);
315 undefined passVariadicNullableTypedArray(Float32Array?... arg);
316 Uint8Array receiveUint8Array();
317 attribute Uint8Array uint8ArrayAttr;
320 undefined passString(DOMString arg);
321 undefined passNullableString(DOMString? arg);
322 undefined passOptionalString(optional DOMString arg);
323 undefined passOptionalStringWithDefaultValue(optional DOMString arg = "abc");
324 undefined passOptionalNullableString(optional DOMString? arg);
325 undefined passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null);
326 undefined passVariadicString(DOMString... arg);
329 undefined passByteString(ByteString arg);
330 undefined passNullableByteString(ByteString? arg);
331 undefined passOptionalByteString(optional ByteString arg);
332 undefined passOptionalByteStringWithDefaultValue(optional ByteString arg = "abc");
333 undefined passOptionalNullableByteString(optional ByteString? arg);
334 undefined passOptionalNullableByteStringWithDefaultValue(optional ByteString? arg = null);
335 undefined passVariadicByteString(ByteString... arg);
336 undefined passUnionByteString((ByteString or long) arg);
337 undefined passOptionalUnionByteString(optional (ByteString or long) arg);
338 undefined passOptionalUnionByteStringWithDefaultValue(optional (ByteString or long) arg = "abc");
341 undefined passUTF8String(UTF8String arg);
342 undefined passNullableUTF8String(UTF8String? arg);
343 undefined passOptionalUTF8String(optional UTF8String arg);
344 undefined passOptionalUTF8StringWithDefaultValue(optional UTF8String arg = "abc");
345 undefined passOptionalNullableUTF8String(optional UTF8String? arg);
346 undefined passOptionalNullableUTF8StringWithDefaultValue(optional UTF8String? arg = null);
347 undefined passVariadicUTF8String(UTF8String... arg);
348 undefined passUnionUTF8String((UTF8String or long) arg);
349 undefined passOptionalUnionUTF8String(optional (UTF8String or long) arg);
350 undefined passOptionalUnionUTF8StringWithDefaultValue(optional (UTF8String or long) arg = "abc");
353 undefined passSVS(USVString arg);
354 undefined passNullableSVS(USVString? arg);
355 undefined passOptionalSVS(optional USVString arg);
356 undefined passOptionalSVSWithDefaultValue(optional USVString arg = "abc");
357 undefined passOptionalNullableSVS(optional USVString? arg);
358 undefined passOptionalNullableSVSWithDefaultValue(optional USVString? arg = null);
359 undefined passVariadicSVS(USVString... arg);
360 USVString receiveSVS();
363 undefined passJSString(JSString arg);
364 // undefined passNullableJSString(JSString? arg); // NOT SUPPORTED YET
365 // undefined passOptionalJSString(optional JSString arg); // NOT SUPPORTED YET
366 undefined passOptionalJSStringWithDefaultValue(optional JSString arg = "abc");
367 // undefined passOptionalNullableJSString(optional JSString? arg); // NOT SUPPORTED YET
368 // undefined passOptionalNullableJSStringWithDefaultValue(optional JSString? arg = null); // NOT SUPPORTED YET
369 // undefined passVariadicJSString(JSString... arg); // NOT SUPPORTED YET
370 // undefined passRecordOfJSString(record<DOMString, JSString> arg); // NOT SUPPORTED YET
371 // undefined passSequenceOfJSString(sequence<JSString> arg); // NOT SUPPORTED YET
372 // undefined passUnionJSString((JSString or long) arg); // NOT SUPPORTED YET
373 JSString receiveJSString();
374 // sequence<JSString> receiveJSStringSequence(); // NOT SUPPORTED YET
375 // (JSString or long) receiveJSStringUnion(); // NOT SUPPORTED YET
376 // record<DOMString, JSString> receiveJSStringRecord(); // NOT SUPPORTED YET
377 readonly attribute JSString readonlyJSStringAttr;
378 attribute JSString jsStringAttr;
381 undefined passEnum(TestEnum arg);
382 undefined passNullableEnum(TestEnum? arg);
383 undefined passOptionalEnum(optional TestEnum arg);
384 undefined passEnumWithDefault(optional TestEnum arg = "a");
385 undefined passOptionalNullableEnum(optional TestEnum? arg);
386 undefined passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null);
387 undefined passOptionalNullableEnumWithDefaultValue2(optional TestEnum? arg = "a");
388 TestEnum receiveEnum();
389 TestEnum? receiveNullableEnum();
390 attribute TestEnum enumAttribute;
391 readonly attribute TestEnum readonlyEnumAttribute;
394 undefined passCallback(TestCallback arg);
395 undefined passNullableCallback(TestCallback? arg);
396 undefined passOptionalCallback(optional TestCallback arg);
397 undefined passOptionalNullableCallback(optional TestCallback? arg);
398 undefined passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null);
399 TestCallback receiveCallback();
400 TestCallback? receiveNullableCallback();
401 undefined passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg);
402 undefined passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg);
403 undefined passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null);
406 undefined passAny(any arg);
407 undefined passVariadicAny(any... arg);
408 undefined passOptionalAny(optional any arg);
409 undefined passAnyDefaultNull(optional any arg = null);
410 undefined passSequenceOfAny(sequence<any> arg);
411 undefined passNullableSequenceOfAny(sequence<any>? arg);
412 undefined passOptionalSequenceOfAny(optional sequence<any> arg);
413 undefined passOptionalNullableSequenceOfAny(optional sequence<any>? arg);
414 undefined passOptionalSequenceOfAnyWithDefaultValue(optional sequence<any>? arg = null);
415 undefined passSequenceOfSequenceOfAny(sequence<sequence<any>> arg);
416 undefined passSequenceOfNullableSequenceOfAny(sequence<sequence<any>?> arg);
417 undefined passNullableSequenceOfNullableSequenceOfAny(sequence<sequence<any>?>? arg);
418 undefined passOptionalNullableSequenceOfNullableSequenceOfAny(optional sequence<sequence<any>?>? arg);
419 undefined passRecordOfAny(record<DOMString, any> arg);
420 undefined passNullableRecordOfAny(record<DOMString, any>? arg);
421 undefined passOptionalRecordOfAny(optional record<DOMString, any> arg);
422 undefined passOptionalNullableRecordOfAny(optional record<DOMString, any>? arg);
423 undefined passOptionalRecordOfAnyWithDefaultValue(optional record<DOMString, any>? arg = null);
424 undefined passRecordOfRecordOfAny(record<DOMString, record<DOMString, any>> arg);
425 undefined passRecordOfNullableRecordOfAny(record<DOMString, record<DOMString, any>?> arg);
426 undefined passNullableRecordOfNullableRecordOfAny(record<DOMString, record<DOMString, any>?>? arg);
427 undefined passOptionalNullableRecordOfNullableRecordOfAny(optional record<DOMString, record<DOMString, any>?>? arg);
428 undefined passOptionalNullableRecordOfNullableSequenceOfAny(optional record<DOMString, sequence<any>?>? arg);
429 undefined passOptionalNullableSequenceOfNullableRecordOfAny(optional sequence<record<DOMString, any>?>? arg);
433 undefined passObject(object arg);
434 undefined passVariadicObject(object... arg);
435 undefined passNullableObject(object? arg);
436 undefined passVariadicNullableObject(object... arg);
437 undefined passOptionalObject(optional object arg);
438 undefined passOptionalNullableObject(optional object? arg);
439 undefined passOptionalNullableObjectWithDefaultValue(optional object? arg = null);
440 undefined passSequenceOfObject(sequence<object> arg);
441 undefined passSequenceOfNullableObject(sequence<object?> arg);
442 undefined passNullableSequenceOfObject(sequence<object>? arg);
443 undefined passOptionalNullableSequenceOfNullableSequenceOfObject(optional sequence<sequence<object>?>? arg);
444 undefined passOptionalNullableSequenceOfNullableSequenceOfNullableObject(optional sequence<sequence<object?>?>? arg);
445 undefined passRecordOfObject(record<DOMString, object> arg);
446 object receiveObject();
447 object? receiveNullableObject();
450 undefined passUnion((object or long) arg);
451 // Some union tests are debug-only to avoid creating all those
452 // unused union types in opt builds.
455 undefined passUnion2((long or boolean) arg);
456 undefined passUnion3((object or long or boolean) arg);
457 undefined passUnion4((Node or long or boolean) arg);
458 undefined passUnion5((object or boolean) arg);
459 undefined passUnion6((object or DOMString) arg);
460 undefined passUnion7((object or DOMString or long) arg);
461 undefined passUnion8((object or DOMString or boolean) arg);
462 undefined passUnion9((object or DOMString or long or boolean) arg);
463 undefined passUnion10(optional (EventInit or long) arg = {});
464 undefined passUnion11(optional (CustomEventInit or long) arg = {});
465 undefined passUnion12(optional (EventInit or long) arg = 5);
466 undefined passUnion13(optional (object or long?) arg = null);
467 undefined passUnion14(optional (object or long?) arg = 5);
468 undefined passUnion15((sequence<long> or long) arg);
469 undefined passUnion16(optional (sequence<long> or long) arg);
470 undefined passUnion17(optional (sequence<long>? or long) arg = 5);
471 undefined passUnion18((sequence<object> or long) arg);
472 undefined passUnion19(optional (sequence<object> or long) arg);
473 undefined passUnion20(optional (sequence<object> or long) arg = []);
474 undefined passUnion21((record<DOMString, long> or long) arg);
475 undefined passUnion22((record<DOMString, object> or long) arg);
476 undefined passUnion23((sequence<ImageData> or long) arg);
477 undefined passUnion24((sequence<ImageData?> or long) arg);
478 undefined passUnion25((sequence<sequence<ImageData>> or long) arg);
479 undefined passUnion26((sequence<sequence<ImageData?>> or long) arg);
480 undefined passUnion27(optional (sequence<DOMString> or EventInit) arg = {});
481 undefined passUnion28(optional (EventInit or sequence<DOMString>) arg = {});
482 undefined passUnionWithCallback((EventHandler or long) arg);
483 undefined passUnionWithByteString((ByteString or long) arg);
484 undefined passUnionWithUTF8String((UTF8String or long) arg);
485 undefined passUnionWithRecord((record<DOMString, DOMString> or DOMString) arg);
486 undefined passUnionWithRecordAndSequence((record<DOMString, DOMString> or sequence<DOMString>) arg);
487 undefined passUnionWithSequenceAndRecord((sequence<DOMString> or record<DOMString, DOMString>) arg);
488 undefined passUnionWithSVS((USVString or long) arg);
490 undefined passUnionWithNullable((object? or long) arg);
491 undefined passNullableUnion((object or long)? arg);
492 undefined passOptionalUnion(optional (object or long) arg);
493 undefined passOptionalNullableUnion(optional (object or long)? arg);
494 undefined passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null);
495 //undefined passUnionWithInterfaces((TestInterface or TestExternalInterface) arg);
496 //undefined passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg);
497 //undefined passUnionWithSequence((sequence<object> or long) arg);
498 undefined passUnionWithArrayBuffer((UTF8String or ArrayBuffer) arg);
499 undefined passUnionWithArrayBufferOrNull((UTF8String or ArrayBuffer?) arg);
500 undefined passUnionWithTypedArrays((ArrayBufferView or ArrayBuffer) arg);
501 undefined passUnionWithTypedArraysOrNull((ArrayBufferView or ArrayBuffer?) arg);
502 undefined passUnionWithString((DOMString or object) arg);
503 // Using an enum in a union. Note that we use some enum not declared in our
504 // binding file, because UnionTypes.h will need to include the binding header
505 // for this enum. Pick an enum from an interface that won't drag in too much
507 undefined passUnionWithEnum((SupportedType or object) arg);
509 // Trying to use a callback in a union won't include the test
510 // headers, unfortunately, so won't compile.
511 // undefined passUnionWithCallback((TestCallback or long) arg);
512 undefined passUnionWithObject((object or long) arg);
513 //undefined passUnionWithDict((Dict or long) arg);
515 undefined passUnionWithDefaultValue1(optional (double or DOMString) arg = "");
516 undefined passUnionWithDefaultValue2(optional (double or DOMString) arg = 1);
517 undefined passUnionWithDefaultValue3(optional (double or DOMString) arg = 1.5);
518 undefined passUnionWithDefaultValue4(optional (float or DOMString) arg = "");
519 undefined passUnionWithDefaultValue5(optional (float or DOMString) arg = 1);
520 undefined passUnionWithDefaultValue6(optional (float or DOMString) arg = 1.5);
521 undefined passUnionWithDefaultValue7(optional (unrestricted double or DOMString) arg = "");
522 undefined passUnionWithDefaultValue8(optional (unrestricted double or DOMString) arg = 1);
523 undefined passUnionWithDefaultValue9(optional (unrestricted double or DOMString) arg = 1.5);
524 undefined passUnionWithDefaultValue10(optional (unrestricted double or DOMString) arg = Infinity);
525 undefined passUnionWithDefaultValue11(optional (unrestricted float or DOMString) arg = "");
526 undefined passUnionWithDefaultValue12(optional (unrestricted float or DOMString) arg = 1);
527 undefined passUnionWithDefaultValue13(optional (unrestricted float or DOMString) arg = Infinity);
528 undefined passUnionWithDefaultValue14(optional (double or ByteString) arg = "");
529 undefined passUnionWithDefaultValue15(optional (double or ByteString) arg = 1);
530 undefined passUnionWithDefaultValue16(optional (double or ByteString) arg = 1.5);
531 undefined passUnionWithDefaultValue17(optional (double or SupportedType) arg = "text/html");
532 undefined passUnionWithDefaultValue18(optional (double or SupportedType) arg = 1);
533 undefined passUnionWithDefaultValue19(optional (double or SupportedType) arg = 1.5);
534 undefined passUnionWithDefaultValue20(optional (double or USVString) arg = "abc");
535 undefined passUnionWithDefaultValue21(optional (double or USVString) arg = 1);
536 undefined passUnionWithDefaultValue22(optional (double or USVString) arg = 1.5);
537 undefined passUnionWithDefaultValue23(optional (double or UTF8String) arg = "");
538 undefined passUnionWithDefaultValue24(optional (double or UTF8String) arg = 1);
539 undefined passUnionWithDefaultValue25(optional (double or UTF8String) arg = 1.5);
541 undefined passNullableUnionWithDefaultValue1(optional (double or DOMString)? arg = "");
542 undefined passNullableUnionWithDefaultValue2(optional (double or DOMString)? arg = 1);
543 undefined passNullableUnionWithDefaultValue3(optional (double or DOMString)? arg = null);
544 undefined passNullableUnionWithDefaultValue4(optional (float or DOMString)? arg = "");
545 undefined passNullableUnionWithDefaultValue5(optional (float or DOMString)? arg = 1);
546 undefined passNullableUnionWithDefaultValue6(optional (float or DOMString)? arg = null);
547 undefined passNullableUnionWithDefaultValue7(optional (unrestricted double or DOMString)? arg = "");
548 undefined passNullableUnionWithDefaultValue8(optional (unrestricted double or DOMString)? arg = 1);
549 undefined passNullableUnionWithDefaultValue9(optional (unrestricted double or DOMString)? arg = null);
550 undefined passNullableUnionWithDefaultValue10(optional (unrestricted float or DOMString)? arg = "");
551 undefined passNullableUnionWithDefaultValue11(optional (unrestricted float or DOMString)? arg = 1);
552 undefined passNullableUnionWithDefaultValue12(optional (unrestricted float or DOMString)? arg = null);
553 undefined passNullableUnionWithDefaultValue13(optional (double or ByteString)? arg = "");
554 undefined passNullableUnionWithDefaultValue14(optional (double or ByteString)? arg = 1);
555 undefined passNullableUnionWithDefaultValue15(optional (double or ByteString)? arg = 1.5);
556 undefined passNullableUnionWithDefaultValue16(optional (double or ByteString)? arg = null);
557 undefined passNullableUnionWithDefaultValue17(optional (double or SupportedType)? arg = "text/html");
558 undefined passNullableUnionWithDefaultValue18(optional (double or SupportedType)? arg = 1);
559 undefined passNullableUnionWithDefaultValue19(optional (double or SupportedType)? arg = 1.5);
560 undefined passNullableUnionWithDefaultValue20(optional (double or SupportedType)? arg = null);
561 undefined passNullableUnionWithDefaultValue21(optional (double or USVString)? arg = "abc");
562 undefined passNullableUnionWithDefaultValue22(optional (double or USVString)? arg = 1);
563 undefined passNullableUnionWithDefaultValue23(optional (double or USVString)? arg = 1.5);
564 undefined passNullableUnionWithDefaultValue24(optional (double or USVString)? arg = null);
565 undefined passNullableUnionWithDefaultValue25(optional (double or UTF8String)? arg = "");
566 undefined passNullableUnionWithDefaultValue26(optional (double or UTF8String)? arg = 1);
567 undefined passNullableUnionWithDefaultValue27(optional (double or UTF8String)? arg = 1.5);
568 undefined passNullableUnionWithDefaultValue28(optional (double or UTF8String)? arg = null);
570 undefined passSequenceOfUnions(sequence<(CanvasPattern or CanvasGradient)> arg);
571 undefined passSequenceOfUnions2(sequence<(object or long)> arg);
572 undefined passVariadicUnion((CanvasPattern or CanvasGradient)... arg);
574 undefined passSequenceOfNullableUnions(sequence<(CanvasPattern or CanvasGradient)?> arg);
575 undefined passVariadicNullableUnion((CanvasPattern or CanvasGradient)?... arg);
576 undefined passRecordOfUnions(record<DOMString, (CanvasPattern or CanvasGradient)> arg);
577 // XXXbz no move constructor on some unions
578 // undefined passRecordOfUnions2(record<DOMString, (object or long)> arg);
580 (CanvasPattern or CanvasGradient) receiveUnion();
581 (object or long) receiveUnion2();
582 (CanvasPattern? or CanvasGradient) receiveUnionContainingNull();
583 (CanvasPattern or CanvasGradient)? receiveNullableUnion();
584 (object or long)? receiveNullableUnion2();
585 (undefined or CanvasPattern) receiveUnionWithUndefined();
586 (undefined? or CanvasPattern) receiveUnionWithNullableUndefined();
587 (undefined or CanvasPattern?) receiveUnionWithUndefinedAndNullable();
588 (undefined or CanvasPattern)? receiveNullableUnionWithUndefined();
590 attribute (CanvasPattern or CanvasGradient) writableUnion;
591 attribute (CanvasPattern? or CanvasGradient) writableUnionContainingNull;
592 attribute (CanvasPattern or CanvasGradient)? writableNullableUnion;
593 attribute (undefined or CanvasPattern) writableUnionWithUndefined;
594 attribute (undefined? or CanvasPattern) writableUnionWithNullableUndefined;
595 attribute (undefined or CanvasPattern?) writableUnionWithUndefinedAndNullable;
596 attribute (undefined or CanvasPattern)? writableNullableUnionWithUndefined;
599 undefined passPromise(Promise<any> arg);
600 undefined passOptionalPromise(optional Promise<any> arg);
601 undefined passPromiseSequence(sequence<Promise<any>> arg);
602 Promise<any> receivePromise();
603 Promise<any> receiveAddrefedPromise();
605 // ObservableArray types
606 attribute ObservableArray<boolean> booleanObservableArray;
607 attribute ObservableArray<object> objectObservableArray;
608 attribute ObservableArray<any> anyObservableArray;
609 attribute ObservableArray<TestInterface> interfaceObservableArray;
610 attribute ObservableArray<long?> nullableObservableArray;
613 [BinaryName="methodRenamedTo"]
614 undefined methodRenamedFrom();
615 [BinaryName="methodRenamedTo"]
616 undefined methodRenamedFrom(byte argument);
617 [BinaryName="attributeGetterRenamedTo"]
618 readonly attribute byte attributeGetterRenamedFrom;
619 [BinaryName="attributeRenamedTo"]
620 attribute byte attributeRenamedFrom;
622 undefined passDictionary(optional Dict x = {});
623 undefined passDictionary2(Dict x);
625 readonly attribute Dict readonlyDictionary;
627 readonly attribute Dict? readonlyNullableDictionary;
629 attribute Dict writableDictionary;
630 [Cached, Pure, Frozen]
631 readonly attribute Dict readonlyFrozenDictionary;
632 [Cached, Pure, Frozen]
633 readonly attribute Dict? readonlyFrozenNullableDictionary;
634 [Cached, Pure, Frozen]
635 attribute Dict writableFrozenDictionary;
636 Dict receiveDictionary();
637 Dict? receiveNullableDictionary();
638 undefined passOtherDictionary(optional GrandparentDict x = {});
639 undefined passSequenceOfDictionaries(sequence<Dict> x);
640 undefined passRecordOfDictionaries(record<DOMString, GrandparentDict> x);
641 // No support for nullable dictionaries inside a sequence (nor should there be)
642 // undefined passSequenceOfNullableDictionaries(sequence<Dict?> x);
643 undefined passDictionaryOrLong(optional Dict x = {});
644 undefined passDictionaryOrLong(long x);
646 undefined passDictContainingDict(optional DictContainingDict arg = {});
647 undefined passDictContainingSequence(optional DictContainingSequence arg = {});
648 DictContainingSequence receiveDictContainingSequence();
649 undefined passVariadicDictionary(Dict... arg);
651 // EnforceRange/Clamp tests
652 undefined dontEnforceRangeOrClamp(byte arg);
653 undefined doEnforceRange([EnforceRange] byte arg);
654 undefined doEnforceRangeNullable([EnforceRange] byte? arg);
655 undefined doClamp([Clamp] byte arg);
656 undefined doClampNullable([Clamp] byte? arg);
657 attribute [EnforceRange] byte enforcedByte;
658 attribute [EnforceRange] byte? enforcedByteNullable;
659 attribute [Clamp] byte clampedByte;
660 attribute [Clamp] byte? clampedByteNullable;
663 const myLong myLongConstant = 5;
664 undefined exerciseTypedefInterfaces1(AnotherNameForTestInterface arg);
665 AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg);
666 undefined exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg);
668 // Deprecated methods and attributes
669 [Deprecated="Components"]
670 attribute boolean deprecatedAttribute;
671 [Deprecated="Components"]
672 undefined deprecatedMethod(boolean arg);
673 [Deprecated="Components"]
674 undefined deprecatedMethodWithContext(any arg);
676 // Static methods and attributes
677 static attribute boolean staticAttribute;
678 static undefined staticMethod(boolean arg);
679 static undefined staticMethodWithContext(any arg);
681 // Deprecated methods and attributes;
682 [Deprecated="Components"]
683 static attribute boolean staticDeprecatedAttribute;
684 [Deprecated="Components"]
685 static undefined staticDeprecatedMethod(boolean arg);
686 [Deprecated="Components"]
687 static undefined staticDeprecatedMethodWithContext(any arg);
689 // Overload resolution tests
690 //undefined overload1(DOMString... strs);
691 boolean overload1(TestInterface arg);
692 TestInterface overload1(DOMString strs, TestInterface arg);
693 undefined overload2(TestInterface arg);
694 undefined overload2(optional Dict arg = {});
695 undefined overload2(boolean arg);
696 undefined overload2(DOMString arg);
697 undefined overload3(TestInterface arg);
698 undefined overload3(TestCallback arg);
699 undefined overload3(boolean arg);
700 undefined overload4(TestInterface arg);
701 undefined overload4(TestCallbackInterface arg);
702 undefined overload4(DOMString arg);
703 undefined overload5(long arg);
704 undefined overload5(TestEnum arg);
705 undefined overload6(long arg);
706 undefined overload6(boolean arg);
707 undefined overload7(long arg);
708 undefined overload7(boolean arg);
709 undefined overload7(ByteString arg);
710 undefined overload8(long arg);
711 undefined overload8(TestInterface arg);
712 undefined overload9(long? arg);
713 undefined overload9(DOMString arg);
714 undefined overload10(long? arg);
715 undefined overload10(object arg);
716 undefined overload11(long arg);
717 undefined overload11(DOMString? arg);
718 undefined overload12(long arg);
719 undefined overload12(boolean? arg);
720 undefined overload13(long? arg);
721 undefined overload13(boolean arg);
722 undefined overload14(optional long arg);
723 undefined overload14(TestInterface arg);
724 undefined overload15(long arg);
725 undefined overload15(optional TestInterface arg);
726 undefined overload16(long arg);
727 undefined overload16(optional TestInterface? arg);
728 undefined overload17(sequence<long> arg);
729 undefined overload17(record<DOMString, long> arg);
730 undefined overload18(record<DOMString, DOMString> arg);
731 undefined overload18(sequence<DOMString> arg);
732 undefined overload19(sequence<long> arg);
733 undefined overload19(optional Dict arg = {});
734 undefined overload20(optional Dict arg = {});
735 undefined overload20(sequence<long> arg);
738 undefined passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3);
740 // Conditionally exposed methods/attributes
741 [Pref="dom.webidl.test1"]
742 readonly attribute boolean prefable1;
743 [Pref="dom.webidl.test1"]
744 readonly attribute boolean prefable2;
745 [Pref="dom.webidl.test2"]
746 readonly attribute boolean prefable3;
747 [Pref="dom.webidl.test2"]
748 readonly attribute boolean prefable4;
749 [Pref="dom.webidl.test1"]
750 readonly attribute boolean prefable5;
751 [Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
752 readonly attribute boolean prefable6;
753 [Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
754 readonly attribute boolean prefable7;
755 [Pref="dom.webidl.test2", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
756 readonly attribute boolean prefable8;
757 [Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
758 readonly attribute boolean prefable9;
759 [Pref="dom.webidl.test1"]
760 undefined prefable10();
761 [Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
762 undefined prefable11();
763 [Pref="dom.webidl.test1", Func="TestFuncControlledMember"]
764 readonly attribute boolean prefable12;
765 [Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
766 undefined prefable13();
767 [Pref="dom.webidl.test1", Func="TestFuncControlledMember"]
768 readonly attribute boolean prefable14;
769 [Func="TestFuncControlledMember"]
770 readonly attribute boolean prefable15;
771 [Func="TestFuncControlledMember"]
772 readonly attribute boolean prefable16;
773 [Pref="dom.webidl.test1", Func="TestFuncControlledMember"]
774 undefined prefable17();
775 [Func="TestFuncControlledMember"]
776 undefined prefable18();
777 [Func="TestFuncControlledMember"]
778 undefined prefable19();
780 undefined prefable20();
782 readonly attribute boolean prefable21;
783 [Trial="TestTrial", Func="TestFuncControlledMember"]
784 readonly attribute boolean prefable22;
786 // Conditionally exposed methods/attributes involving [SecureContext]
788 readonly attribute boolean conditionalOnSecureContext1;
789 [SecureContext, Pref="dom.webidl.test1"]
790 readonly attribute boolean conditionalOnSecureContext2;
791 [SecureContext, Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
792 readonly attribute boolean conditionalOnSecureContext3;
793 [SecureContext, Pref="dom.webidl.test1", Func="TestFuncControlledMember"]
794 readonly attribute boolean conditionalOnSecureContext4;
796 undefined conditionalOnSecureContext5();
797 [SecureContext, Pref="dom.webidl.test1"]
798 undefined conditionalOnSecureContext6();
799 [SecureContext, Pref="dom.webidl.test1", Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
800 undefined conditionalOnSecureContext7();
801 [SecureContext, Pref="dom.webidl.test1", Func="TestFuncControlledMember"]
802 undefined conditionalOnSecureContext8();
803 [SecureContext, Trial="TestTrial"]
804 readonly attribute boolean conditionalOnSecureContext9;
805 [SecureContext, Trial="TestTrial"]
806 undefined conditionalOnSecureContext10();
809 [LegacyLenientThis] attribute long attrWithLenientThis;
810 [LegacyUnforgeable] readonly attribute long unforgeableAttr;
811 [LegacyUnforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
812 [LegacyUnforgeable] long unforgeableMethod();
813 [LegacyUnforgeable, ChromeOnly] long unforgeableMethod2();
815 undefined passRenamedInterface(TestRenamedInterface arg);
816 [PutForwards=writableByte] readonly attribute TestExampleInterface putForwardsAttr;
817 [PutForwards=writableByte, LegacyLenientThis] readonly attribute TestExampleInterface putForwardsAttr2;
818 [PutForwards=writableByte, ChromeOnly] readonly attribute TestExampleInterface putForwardsAttr3;
819 [Throws] undefined throwingMethod();
820 [Throws] attribute boolean throwingAttr;
821 [GetterThrows] attribute boolean throwingGetterAttr;
822 [SetterThrows] attribute boolean throwingSetterAttr;
823 [CanOOM] undefined canOOMMethod();
824 [CanOOM] attribute boolean canOOMAttr;
825 [GetterCanOOM] attribute boolean canOOMGetterAttr;
826 [SetterCanOOM] attribute boolean canOOMSetterAttr;
827 [NeedsSubjectPrincipal] undefined needsSubjectPrincipalMethod();
828 [NeedsSubjectPrincipal] attribute boolean needsSubjectPrincipalAttr;
829 [NeedsSubjectPrincipal=NonSystem] undefined needsNonSystemSubjectPrincipalMethod();
830 [NeedsSubjectPrincipal=NonSystem] attribute boolean needsNonSystemSubjectPrincipalAttr;
831 [NeedsCallerType] undefined needsCallerTypeMethod();
832 [NeedsCallerType] attribute boolean needsCallerTypeAttr;
833 [CEReactions] undefined ceReactionsMethod();
834 [CEReactions] undefined ceReactionsMethodOverload();
835 [CEReactions] undefined ceReactionsMethodOverload(DOMString bar);
836 [CEReactions] attribute boolean ceReactionsAttr;
837 legacycaller short(unsigned long arg1, TestInterface arg2);
838 undefined passArgsWithDefaults(optional long arg1,
839 optional TestInterface? arg2 = null,
840 optional Dict arg3 = {}, optional double arg4 = 5.0,
841 optional float arg5);
842 attribute any toJSONShouldSkipThis;
843 attribute TestParentInterface toJSONShouldSkipThis2;
844 attribute TestCallbackInterface toJSONShouldSkipThis3;
845 [Default] object toJSON();
847 attribute byte dashed-attribute;
848 undefined dashed-method();
850 // [NonEnumerable] tests
852 attribute boolean nonEnumerableAttr;
854 const boolean nonEnumerableConst = true;
856 undefined nonEnumerableMethod();
858 // [AllowShared] tests
859 attribute [AllowShared] ArrayBufferViewTypedef allowSharedArrayBufferViewTypedef;
860 attribute [AllowShared] ArrayBufferView allowSharedArrayBufferView;
861 attribute [AllowShared] ArrayBufferView? allowSharedNullableArrayBufferView;
862 attribute [AllowShared] ArrayBuffer allowSharedArrayBuffer;
863 attribute [AllowShared] ArrayBuffer? allowSharedNullableArrayBuffer;
865 undefined passAllowSharedArrayBufferViewTypedef(AllowSharedArrayBufferViewTypedef foo);
866 undefined passAllowSharedArrayBufferView([AllowShared] ArrayBufferView foo);
867 undefined passAllowSharedNullableArrayBufferView([AllowShared] ArrayBufferView? foo);
868 undefined passAllowSharedArrayBuffer([AllowShared] ArrayBuffer foo);
869 undefined passAllowSharedNullableArrayBuffer([AllowShared] ArrayBuffer? foo);
870 undefined passUnionArrayBuffer((DOMString or ArrayBuffer) foo);
871 undefined passUnionAllowSharedArrayBuffer((DOMString or [AllowShared] ArrayBuffer) foo);
873 [Frozen, ReflectedHTMLAttributeReturningFrozenArray]
874 attribute sequence<Element>? reflectedHTMLAttributeReturningFrozenArray;
876 // If you add things here, add them to TestExampleGen. If they need to be
877 // supported in JS-implemented WebIDL then you need to add them to
878 // TestJSImplGen as well, if they are not supported in JS-implemented WebIDL
879 // then the codegen should throw for that specific case.
883 interface TestExampleProxyInterface {
884 getter long longIndexedGetter(unsigned long ix);
885 setter undefined longIndexedSetter(unsigned long y, long z);
886 readonly attribute unsigned long length;
887 stringifier DOMString myStringifier();
888 getter short shortNameGetter(DOMString nom);
889 deleter undefined (DOMString nomnom);
890 setter undefined shortNamedSetter(DOMString me, short value);
893 [Exposed=(Window,Worker)]
894 interface TestExampleWorkerInterface {
895 [NeedsSubjectPrincipal] undefined needsSubjectPrincipalMethod();
896 [NeedsSubjectPrincipal] attribute boolean needsSubjectPrincipalAttr;
897 [NeedsCallerType] undefined needsCallerTypeMethod();
898 [NeedsCallerType] attribute boolean needsCallerTypeAttr;
899 [NeedsSubjectPrincipal=NonSystem] undefined needsNonSystemSubjectPrincipalMethod();
900 [NeedsSubjectPrincipal=NonSystem] attribute boolean needsNonSystemSubjectPrincipalAttr;
904 interface TestExampleThrowingConstructorInterface {
908 constructor(DOMString str);
910 constructor(unsigned long num, boolean? boolArg);
912 constructor(TestInterface? iface);
914 constructor(unsigned long arg1, TestInterface iface);
916 constructor(ArrayBuffer arrayBuf);
918 constructor(Uint8Array typedArr);
919 // [Throws] constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3);