OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | |
3 * | |
4 * Redistribution and use in source and binary forms, with or without | |
5 * modification, are permitted provided that the following conditions are | |
6 * met: | |
7 * | |
8 * * Redistributions of source code must retain the above copyright | |
9 * notice, this list of conditions and the following disclaimer. | |
10 * * Redistributions in binary form must reproduce the above | |
11 * copyright notice, this list of conditions and the following disclaimer | |
12 * in the documentation and/or other materials provided with the | |
13 * distribution. | |
14 * * Neither the name of Google Inc. nor the names of its | |
15 * contributors may be used to endorse or promote products derived from | |
16 * this software without specific prior written permission. | |
17 * | |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 */ | |
30 | |
31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"}; | |
32 | |
33 callback VoidCallbackFunction = void (); | |
34 callback AnyCallbackFunctionOptionalAnyArg = any (optional any optionalAnyArg); | |
35 | |
36 // No extended attributes on the interface; those go in TestInterface.idl | |
37 interface TestObject { | |
38 // Constants | |
39 const unsigned short CONST_VALUE_0 = 0; | |
40 const unsigned short CONST_VALUE_1 = 1; | |
41 const unsigned short CONST_VALUE_2 = 2; | |
42 const unsigned short CONST_VALUE_4 = 4; | |
43 const unsigned short CONST_VALUE_8 = 8; | |
44 const short CONST_VALUE_9 = -1; | |
45 const DOMString CONST_VALUE_10 = "my constant string"; | |
46 const unsigned short CONST_VALUE_11 = 0xffffffff; | |
47 const unsigned short CONST_VALUE_12 = 0x01; | |
48 const unsigned short CONST_VALUE_13 = 0X20; | |
49 const unsigned short CONST_VALUE_14 = 0x1abc; | |
50 const unsigned short CONST_VALUE_15 = 010; | |
51 const unsigned short CONST_VALUE_16 = -010; | |
52 const unsigned short CONST_VALUE_16 = -0x1A; | |
53 const unsigned short CONST_VALUE_17 = -0X1a; | |
54 const double CONST_VALUE_18 = 0.123; | |
55 const double CONST_VALUE_19 = 4e9; | |
56 const double CONST_VALUE_20 = 3.4e5; | |
57 const double CONST_VALUE_21 = -1.3; | |
58 const double CONST_VALUE_22 = -4e-9; | |
59 const double CONST_VALUE_23 = .123; | |
60 const double CONST_VALUE_24 = 5E+4; | |
61 const float CONST_VALUE_25 = 1; | |
62 | |
63 // Extended attributes | |
64 [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1; | |
65 [RuntimeEnabled=FeatureName] const short FEATURE_ENABLED_CONST = 1; | |
66 [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1; | |
67 | |
68 stringifier attribute DOMString stringifierAttribute; | |
69 | |
70 // Attributes | |
71 // | |
72 // Naming convention: | |
73 // [ExtAttr] attribute Type extAttrTypeNameAttribute; | |
74 // E.g., | |
75 // [Foo] attribute DOMString? fooStringOrNullAttribute | |
76 // | |
77 // Type name reference: | |
78 // http://heycam.github.io/webidl/#dfn-type-name | |
79 // | |
80 // TestInterfaceEmpty is used as a stub interface type, for testing behavior | |
81 // that should not depend on particular type (beyond "interface or not"). | |
82 // read only | |
83 readonly attribute DOMString readonlyStringAttribute; | |
84 readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute; | |
85 readonly attribute long readonlyLongAttribute; | |
86 // Basic types | |
87 attribute Date dateAttribute; | |
88 attribute DOMString stringAttribute; | |
89 attribute ByteString byteStringAttribute; | |
90 attribute ScalarValueString scalarValueStringAttribute; | |
91 attribute DOMTimeStamp domTimeStampAttribute; | |
92 attribute boolean booleanAttribute; | |
93 attribute byte byteAttribute; | |
94 attribute double doubleAttribute; | |
95 attribute float floatAttribute; | |
96 attribute long longAttribute; | |
97 attribute long long longLongAttribute; | |
98 attribute octet octetAttribute; | |
99 attribute short shortAttribute; | |
100 attribute unrestricted double unrestrictedDoubleAttribute; | |
101 attribute unrestricted float unrestrictedFloatAttribute; | |
102 attribute unsigned long unsignedLongAttribute; | |
103 attribute unsigned long long unsignedLongLongAttribute; | |
104 attribute unsigned short unsignedShortAttribute; | |
105 // Interface type | |
106 attribute TestInterfaceEmpty testInterfaceEmptyAttribute; | |
107 // Self-reference | |
108 attribute TestObject testObjectAttribute; | |
109 // Callback function type | |
110 attribute VoidCallbackFunction voidCallbackFunctionAttribute; | |
111 attribute AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyAr
gAttribute; | |
112 // Names that begin with an acronym | |
113 attribute long cssAttribute; | |
114 attribute long imeAttribute; | |
115 attribute long svgAttribute; | |
116 attribute long xmlAttribute; | |
117 // Non-wrapper types | |
118 attribute NodeFilter nodeFilterAttribute; | |
119 attribute SerializedScriptValue serializedScriptValueAttribute; | |
120 attribute any anyAttribute; | |
121 // Custom type conversions | |
122 attribute Promise promiseAttribute; | |
123 attribute Window windowAttribute; | |
124 // DOM Node types | |
125 attribute Document documentAttribute; | |
126 attribute DocumentFragment documentFragmentAttribute; | |
127 attribute DocumentType documentTypeAttribute; | |
128 attribute Element elementAttribute; | |
129 attribute Node nodeAttribute; | |
130 attribute ShadowRoot shadowRootAttribute; | |
131 // Typed arrays | |
132 attribute ArrayBuffer arrayBufferAttribute; | |
133 attribute Float32Array float32ArrayAttribute; | |
134 attribute Uint8Array uint8ArrayAttribute; | |
135 // Exceptions for is_keep_alive_for_gc | |
136 readonly attribute TestInterfaceEmpty self; | |
137 readonly attribute EventTarget readonlyEventTargetAttribute; | |
138 readonly attribute EventTarget? readonlyEventTargetOrNullAttribute; | |
139 readonly attribute Window readonlyWindowAttribute; | |
140 readonly attribute HTMLCollection htmlCollectionAttribute; | |
141 readonly attribute HTMLElement htmlElementAttribute; | |
142 // Arrays | |
143 attribute DOMString[] stringArrayAttribute; | |
144 attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute; | |
145 attribute float[] floatArrayAttribute; | |
146 // Nullable attributes | |
147 attribute DOMString? stringOrNullAttribute; | |
148 attribute long? longOrNullAttribute; | |
149 attribute TestInterface? testInterfaceOrNullAttribute; | |
150 // Enumerations | |
151 attribute TestEnum testEnumAttribute; | |
152 // Static attributes | |
153 static attribute DOMString staticStringAttribute; | |
154 static attribute long staticLongAttribute; | |
155 // Exceptional type | |
156 attribute EventHandler eventHandlerAttribute; | |
157 | |
158 // Extended attributes | |
159 [LogActivity, LogAllWorlds] attribute long activityLoggingAccessForAllWorlds
LongAttribute; | |
160 [LogActivity=GetterOnly, LogAllWorlds] attribute long activityLoggingGetterF
orAllWorldsLongAttribute; | |
161 [LogActivity=SetterOnly, LogAllWorlds] attribute long activityLoggingSetterF
orAllWorldsLongAttribute; | |
162 [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute; | |
163 [CachedAttribute=isArrayDirty] attribute DOMString[] cachedArrayAttribute; | |
164 [CachedAttribute=isStringDirty] attribute DOMString? cachedStringOrNoneAttri
bute; | |
165 [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribu
te; | |
166 [CallWith=ScriptState] attribute any callWithScriptStateAnyAttribute; | |
167 [CallWith=ExecutionContext|ScriptState] attribute any callWithExecutionConte
xtAndScriptStateAnyAttribute; | |
168 [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonl
yDocumentAttribute; // All uses are read only | |
169 [Conditional=CONDITION] attribute long conditionalLongAttribute; | |
170 [Conditional=(CONDITION_1,CONDITION_2)] attribute long conditionalAndLongAtt
ribute; | |
171 [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttrib
ute; | |
172 // Constructors: FIXME: replace suffix with [ConstructorAttribute] | |
173 attribute TestInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribu
te; | |
174 [DeprecateAs=deprecatedTestInterfaceEmptyConstructorAttribute] attribute Tes
tInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribute; | |
175 [MeasureAs=FeatureName] attribute TestInterfaceEmptyConstructor measureAsFea
tureNameTestInterfaceEmptyConstructorAttribute; | |
176 [Custom] attribute object customObjectAttribute; | |
177 [Custom=Getter] attribute long customGetterLongAttribute; | |
178 [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribut
e; | |
179 [Custom=Setter] attribute long customSetterLongAttribute; | |
180 [Conditional=CONDITION, Custom] attribute long customLongAttribute; | |
181 [CustomElementCallbacks] readonly attribute long customElementsCallbacksRead
onlyLongAttribute; | |
182 [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute; | |
183 [EnforceRange] attribute long enforceRangeLongAttribute; | |
184 [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute; | |
185 [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute; | |
186 [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImp
lementedAsLongAttribute; | |
187 [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customGetterImplementedAsLongAttribute; | |
188 [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customSetterImplementedAsLongAttribute; | |
189 [MeasureAs=TestFeature] attribute long measureAsLongAttribute; | |
190 [NotEnumerable] attribute long notEnumerableLongAttribute; | |
191 [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribut
e; | |
192 [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsRea
donlyTestInterfaceEmptyAttribute; | |
193 [LogActivity, LogAllWorlds, PerWorldBindings] attribute long activityLogging
AccessPerWorldBindingsLongAttribute; | |
194 [LogActivity, PerWorldBindings] attribute long activityLoggingAccessForIsola
tedWorldsPerWorldBindingsLongAttribute; | |
195 [LogActivity=GetterOnly, LogAllWorlds, PerWorldBindings] attribute long acti
vityLoggingGetterPerWorldBindingsLongAttribute; | |
196 [LogActivity=GetterOnly, PerWorldBindings] attribute long activityLoggingGet
terForIsolatedWorldsPerWorldBindingsLongAttribute; | |
197 [PutForwards=href] readonly attribute TestNode location; | |
198 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; | |
199 [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith; | |
200 [PutForwards=hrefByteString] readonly attribute TestNode locationByteString; | |
201 [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWit
hPerWorldBindings; | |
202 [TypeChecking=Interface, PutForwards=href] readonly attribute TestNode locat
ionTypeCheckingInterface; | |
203 [PutForwards=attr1] readonly attribute TestInterfaceGarbageCollected locatio
nGarbageCollected; | |
204 [PutForwards=attr1] readonly attribute TestInterfaceWillBeGarbageCollected l
ocationWillBeGarbageCollected; | |
205 [RaisesException] attribute long raisesExceptionLongAttribute; | |
206 [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute; | |
207 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; | |
208 [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceE
mptyAttribute; | |
209 [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttribut
eRaisesExceptionGetterAnyAttribute; | |
210 [Reflect] attribute TestInterface reflectTestInterfaceAttribute; | |
211 [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNam
eAttributeTestAttribute; | |
212 // [Reflect] exceptional types: exceptional getters, exceptional setters, | |
213 // or range checking for unsigned | |
214 [Reflect] attribute boolean reflectBooleanAttribute; | |
215 [Reflect] attribute long reflectLongAttribute; | |
216 [Reflect] attribute unsigned short reflectUnsignedShortAttribute; | |
217 [Reflect] attribute unsigned long reflectUnsignedLongAttribute; | |
218 // [Reflect] exceptional names | |
219 [Reflect] attribute DOMString id; | |
220 [Reflect] attribute DOMString name; | |
221 [Reflect] attribute DOMString class; | |
222 [Reflect=id] attribute DOMString reflectedId; | |
223 [Reflect=name] attribute DOMString reflectedName; | |
224 [Reflect=class] attribute DOMString reflectedClass; | |
225 // Limited value attributes and enumerated attributes | |
226 [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribut
e; | |
227 [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnl
yAttribute; | |
228 [Reflect=other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedT
oOnlyOtherAttribute; | |
229 [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString
limitedWithMissingDefaultAttribute; | |
230 [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInva
lid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute; | |
231 [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous
", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute
; | |
232 [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="
empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute D
OMString limitedWithEmptyMissingInvalidAttribute; | |
233 | |
234 [Replaceable] readonly attribute long replaceableReadonlyLongAttribute; | |
235 [Replaceable, PutForwards=href] readonly attribute TestNode locationReplacea
ble; | |
236 [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute; | |
237 [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long p
erContextEnabledRuntimeEnabledLongAttribute; | |
238 [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long condition
alRuntimeEnabledLongAttribute; | |
239 [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString setterCallWi
thActiveWindowAndFirstWindowStringAttribute; | |
240 [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutio
nContextStringAttribute; | |
241 [TreatNullAs=EmptyString] attribute DOMString treatNullAsEmptyStringStringAt
tribute; | |
242 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; | |
243 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; | |
244 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; | |
245 [TreatReturnedNullStringAs=Undefined, CachedAttribute=isStringDirty] attribu
te DOMString cachedTreatReturnedNullStringAsUndefinedStringAttribute; | |
246 [TreatReturnedNullStringAs=Null] attribute ByteString treatReturnedNullStrin
gAsNullByteStringAttribute; | |
247 [TreatReturnedNullStringAs=Undefined] attribute ByteString treatReturnedNull
StringAsUndefinedByteStringAttribute; | |
248 [TreatReturnedNullStringAs=Null] attribute ScalarValueString treatReturnedNu
llStringAsNullScalarValueStringAttribute; | |
249 [TreatReturnedNullStringAs=Undefined] attribute ScalarValueString treatRetur
nedNullStringAsUndefinedScalarValueStringAttribute; | |
250 [TypeChecking=Interface] attribute float typeCheckingInterfaceFloatAttribute
; // nop for non-interface types | |
251 [TypeChecking=Interface] attribute TestInterface typeCheckingInterfaceTestIn
terfaceAttribute; | |
252 [TypeChecking=Interface] attribute TestInterface? typeCheckingInterfaceTestI
nterfaceOrNullAttribute; | |
253 [Reflect, URL] attribute DOMString urlStringAttribute; | |
254 [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute; | |
255 [Unforgeable] attribute long unforgeableLongAttribute; | |
256 [LogActivity=SetterOnly, LogPreviousValue] attribute DOMString? activityLogg
ingSetterOnlyLogPreviousValueAttribute; | |
257 [LogActivity, LogPreviousValue] attribute TestInterfaceEmpty activityLogging
LogPreviousValueInterfaceAttribute; | |
258 | |
259 | |
260 // Methods | |
261 // | |
262 // Naming convention: | |
263 // ReturnType returnTypeMethodTypeName1ArgTypeName2Arg(Type1 typeName1Arg, T
ype2 typeName2Arg); | |
264 // E.g., | |
265 // void voidMethodStringArgLongArrayArg(DOMString stringArg, long[] longArra
yArg); | |
266 void voidMethod(); | |
267 static void staticVoidMethod(); | |
268 | |
269 // Types | |
270 // Basic types | |
271 Date dateMethod(); | |
272 DOMString stringMethod(); | |
273 ByteString byteStringMethod(); | |
274 ScalarValueString scalarValueStringMethod(); | |
275 DOMTimeStamp readonlyDOMTimeStampMethod(); | |
276 boolean booleanMethod(); | |
277 byte byteMethod(); | |
278 double doubleMethod(); | |
279 float floatMethod(); | |
280 long longMethod(); | |
281 long long longLongMethod(); | |
282 octet octetMethod(); | |
283 short shortMethod(); | |
284 unsigned long unsignedLongMethod(); | |
285 unsigned long long unsignedLongLongMethod(); | |
286 unsigned short unsignedShortMethod(); | |
287 | |
288 void voidMethodDateArg(Date dateArg); | |
289 void voidMethodStringArg(DOMString stringArg); | |
290 void voidMethodByteStringArg(ByteString stringArg); | |
291 void voidMethodScalarValueStringArg(ScalarValueString scalarValueStringArg); | |
292 void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); | |
293 void voidMethodBooleanArg(boolean booleanArg); | |
294 void voidMethodByteArg(byte byteArg); | |
295 void voidMethodDoubleArg(double doubleArg); | |
296 void voidMethodFloatArg(float floatArg); | |
297 void voidMethodLongArg(long longArg); | |
298 void voidMethodLongLongArg(long long longLongArg); | |
299 void voidMethodOctetArg(octet octetArg); | |
300 void voidMethodShortArg(short shortArg); | |
301 void voidMethodUnsignedLongArg(unsigned long unsignedLongArg); | |
302 void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg); | |
303 void voidMethodUnsignedShortArg(unsigned short unsignedShortArg); | |
304 // Interface types | |
305 TestInterfaceEmpty testInterfaceEmptyMethod(); | |
306 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | |
307 void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty
testInterfaceEmptyArg); | |
308 // Callback function type | |
309 VoidCallbackFunction voidCallbackFunctionMethod(); | |
310 AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod(); | |
311 void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunc
tionArg); | |
312 void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptional
AnyArg anyCallbackFunctionOptionalAnyArgArg); | |
313 // Custom type conversions | |
314 CompareHow compareHowMethod(); | |
315 any anyMethod(); | |
316 void voidMethodCompareHowArg(CompareHow compareHowArg); | |
317 void voidMethodEventTargetArg(EventTarget eventTargetArg); | |
318 void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryLi
stListenerArg); | |
319 void voidMethodAnyArg(any anyArg); | |
320 // DOM node types | |
321 void voidMethodAttrArg(Attr attrArg); | |
322 void voidMethodDocumentArg(Document documentArg); | |
323 void voidMethodDocumentTypeArg(DocumentType documentTypeArg); | |
324 void voidMethodElementArg(Element elementArg); | |
325 void voidMethodNodeArg(Node nodeArg); | |
326 // Typed arrays | |
327 ArrayBuffer arrayBufferMethod(); | |
328 ArrayBufferView arrayBufferViewMethod(); | |
329 Float32Array float32ArrayMethod(); | |
330 Int32Array int32ArrayMethod(); | |
331 Uint8Array uint8ArrayMethod(); | |
332 void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg); | |
333 void voidMethodArrayBufferOrNullArg(ArrayBuffer? arrayBufferArg); | |
334 void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg); | |
335 void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg); | |
336 void voidMethodInt32ArrayArg(Int32Array int32ArrayArg); | |
337 void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg); | |
338 // Arrays | |
339 long[] longArrayMethod(); | |
340 DOMString[] stringArrayMethod(); | |
341 TestInterfaceEmpty[] testInterfaceEmptyArrayMethod(); | |
342 void voidMethodArrayLongArg(long[] arrayLongArg); | |
343 void voidMethodArrayStringArg(DOMString[] arrayStringArg); | |
344 void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInte
rfaceEmptyArg); | |
345 // Sequences | |
346 sequence<long> longSequenceMethod(); | |
347 sequence<DOMString> stringSequenceMethod(); | |
348 sequence<TestInterfaceEmpty> testInterfaceEmptySequenceMethod(); | |
349 void voidMethodSequenceLongArg(sequence<long> longSequenceArg); | |
350 void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg); | |
351 void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> te
stInterfaceEmptySequenceArg); | |
352 // Nullable types | |
353 long? nullableLongMethod(); | |
354 DOMString? nullableStringMethod(); | |
355 TestInterface? nullableTestInterfaceMethod(); | |
356 sequence<long>? nullableLongSequenceMethod(); | |
357 // Currently only used on interface type arguments | |
358 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI
nterfaceEmptyArg); | |
359 // Callback interface types | |
360 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn
terfaceArg); | |
361 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa
ce optionalTestCallbackInterfaceArg); | |
362 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal
lbackInterfaceArg); | |
363 // Enumerations | |
364 TestEnum testEnumMethod(); | |
365 void voidMethodTestEnumArg(TestEnum testEnumTypeArg); | |
366 // Exceptional types | |
367 Dictionary dictionaryMethod(); | |
368 NodeFilter nodeFilterMethod(); | |
369 Promise promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString.
.. variadic); | |
370 Promise promiseMethodWithoutExceptionState(Dictionary arg1); | |
371 SerializedScriptValue serializedScriptValueMethod(); | |
372 XPathNSResolver xPathNSResolverMethod(); | |
373 void voidMethodDictionaryArg(Dictionary dictionaryArg); | |
374 void voidMethodNodeFilterArg(NodeFilter nodeFilterArg); | |
375 void voidMethodPromiseArg(Promise promiseArg); | |
376 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri
ptValueArg); | |
377 void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg); | |
378 void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequence
Arg); | |
379 | |
380 // Arguments | |
381 void voidMethodStringArgLongArg(DOMString stringArg, long longArg); | |
382 // Optional arguments | |
383 void voidMethodOptionalStringArg(optional DOMString optionalStringArg); | |
384 void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty opt
ionalTestInterfaceEmptyArg); | |
385 void voidMethodOptionalLongArg(optional long optionalLongArg); | |
386 DOMString stringMethodOptionalLongArg(optional long optionalLongArg); | |
387 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt
ionalLongArg); | |
388 long longMethodOptionalLongArg(optional long optionalLongArg); | |
389 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo
ngArg); | |
390 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional
long optionalLongArg1, optional long optionalLongArg2); | |
391 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T
estInterfaceEmpty optionalTestInterfaceEmpty); | |
392 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio
nalTestInterfaceEmpty, optional long longArg); | |
393 // Optional arguments: exceptional case | |
394 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA
rg); | |
395 | |
396 // Optional arguments with defaults | |
397 void voidMethodDefaultByteStringArg(optional ByteString defaultByteStringArg
= "foo"); | |
398 void voidMethodDefaultStringArg(optional DOMString defaultStringArg = "foo")
; | |
399 void voidMethodDefaultIntegerArgs(optional long defaultLongArg = 10, | |
400 optional long long defaultLongLongArg = -1
0, | |
401 optional unsigned long defaultUnsignedArg
= 0xFFFFFFFF); | |
402 void voidMethodDefaultDoubleArg(optional double defaultDoubleArg = 0.5); | |
403 void voidMethodDefaultTrueBooleanArg(optional boolean defaultBooleanArg = tr
ue); | |
404 void voidMethodDefaultFalseBooleanArg(optional boolean defaultBooleanArg = f
alse); | |
405 void voidMethodDefaultNullableByteStringArg(optional ByteString? defaultStri
ngArg = null); | |
406 void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg
= null); | |
407 void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defau
ltTestInterfaceArg = null); | |
408 | |
409 // Variadic operations | |
410 void voidMethodVariadicStringArg(DOMString... variadicStringArgs); | |
411 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString...
variadicStringArgs); | |
412 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT
estInterfaceEmptyArgs); | |
413 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf
aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty
Args); | |
414 void voidMethodVariadicTestInterfaceGarbageCollectedArg(TestInterfaceGarbage
Collected... variadicTestInterfaceGarbageCollectedArg); | |
415 void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceW
illBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg); | |
416 | |
417 // Overloaded methods | |
418 void overloadedMethodA(long longArg); | |
419 void overloadedMethodA(long longArg1, long longArg2); | |
420 void overloadedMethodB(long longArg); | |
421 void overloadedMethodB(DOMString stringArg, optional long longArg); | |
422 void overloadedMethodC(long longArg); | |
423 void overloadedMethodC(TestInterfaceEmpty testInterfaceEmptyArg); | |
424 void overloadedMethodD(long longArg); | |
425 void overloadedMethodD(long[] longArrayArg); | |
426 void overloadedMethodE(long longArg); | |
427 void overloadedMethodE(TestInterfaceEmpty? testInterfaceEmptyOrNullArg); | |
428 void overloadedMethodF(optional DOMString stringArg); | |
429 void overloadedMethodF(double doubleArg); | |
430 void overloadedMethodG(long longArg); | |
431 void overloadedMethodG(optional TestInterfaceEmpty? testInterfaceEmptyOrNull
Arg = null); | |
432 void overloadedMethodH(TestInterface testInterfaceArg); | |
433 void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg); | |
434 void overloadedMethodI(DOMString stringArg); | |
435 void overloadedMethodI(double doubleArg); | |
436 | |
437 | |
438 [PerWorldBindings] void overloadedPerWorldBindingsMethod(); | |
439 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); | |
440 | |
441 static void overloadedStaticMethod(long longArg); | |
442 static void overloadedStaticMethod(long longArg1, long longArg2); | |
443 | |
444 // Extended attributes for arguments | |
445 // [Clamp] | |
446 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho
rtArg); | |
447 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA
rg); | |
448 // [Default] | |
449 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt
ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); | |
450 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def
aultUndefinedLongArg); | |
451 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr
ing defaultUndefinedStringArg); | |
452 // [EnforceRange] | |
453 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); | |
454 // [TreatNullAs], [TreatUndefinedAs] | |
455 void voidMethodTreatNullAsEmptyStringStringArg([TreatNullAs=EmptyString] DOM
String treatNullAsEmptyStringStringArg); | |
456 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt
ring treatNullAsNullStringStringArg); | |
457 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre
atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin
gStringArg); | |
458 | |
459 // Extended attributes for methods | |
460 [LogActivity, LogAllWorlds] void activityLoggingAccessForAllWorldsMethod(); | |
461 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod(); | |
462 [CallWith=ScriptState] void callWithScriptStateVoidMethod(); | |
463 [CallWith=ScriptState] long callWithScriptStateLongMethod(); | |
464 [CallWith=(ScriptState,ExecutionContext)] void callWithScriptStateExecutionC
ontextVoidMethod(); | |
465 [CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgum
entsVoidMethod(); | |
466 [CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgum
entsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg); | |
467 [CallWith=ActiveWindow] void callWithActiveWindow(); | |
468 [CallWith=(ActiveWindow,FirstWindow)] void callWithActiveWindowScriptWindow(
); | |
469 [CheckSecurity=Node] void checkSecurityForNodeVoidMethod(); | |
470 [Conditional=CONDITION] void conditionalConditionVoidMethod(); | |
471 [Conditional=(CONDITION_1,CONDITION_2)] void conditionalCondition1AndConditi
on2VoidMethod(); | |
472 [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod(); | |
473 [Custom] void customVoidMethod(); | |
474 [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod(); | |
475 [CustomElementCallbacks] void customElementCallbacksVoidMethod(); | |
476 [DeprecateAs=voidMethod] void deprecatedVoidMethod(); | |
477 [DoNotCheckSignature] void doNotCheckSignatureVoidMethod(); | |
478 [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod(); | |
479 [MeasureAs=TestFeature] void measureAsVoidMethod(); | |
480 [DeprecateAs=TestFeatureA] void DeprecateAsOverloadedMethod(); | |
481 [DeprecateAs=TestFeatureB] void DeprecateAsOverloadedMethod(long arg); | |
482 [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(); | |
483 [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(long arg
); | |
484 [MeasureAs=TestFeatureA] void measureAsOverloadedMethod(); | |
485 [MeasureAs=TestFeatureB] void measureAsOverloadedMethod(long arg); | |
486 [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod(); | |
487 [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod(long arg); | |
488 [DeprecateAs=TestFeatureA, MeasureAs=TestFeature] void deprecateAsMeasureAsS
ameValueOverloadedMethod(); | |
489 [DeprecateAs=TestFeatureB, MeasureAs=TestFeature] void deprecateAsMeasureAsS
ameValueOverloadedMethod(long arg); | |
490 [DeprecateAs=TestFeature, MeasureAs=TestFeatureA] void deprecateAsSameValueM
easureAsOverloadedMethod(); | |
491 [DeprecateAs=TestFeature, MeasureAs=TestFeatureB] void deprecateAsSameValueM
easureAsOverloadedMethod(long arg); | |
492 [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValue
MeasureAsSameValueOverloadedMethod(); | |
493 [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValue
MeasureAsSameValueOverloadedMethod(long arg); | |
494 [NotEnumerable] void notEnumerableVoidMethod(); | |
495 [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod(); | |
496 [PerWorldBindings] void perWorldBindingsVoidMethod(); | |
497 [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(Test
InterfaceEmpty testInterfaceEmptyArg); | |
498 [LogActivity, LogAllWorlds, PerWorldBindings] void activityLoggingForAllWorl
dsPerWorldBindingsVoidMethod(); | |
499 [LogActivity, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorl
dBindingsVoidMethod(); | |
500 [RaisesException] void raisesExceptionVoidMethod(); | |
501 [RaisesException] DOMString raisesExceptionStringMethod(); | |
502 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); | |
503 [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(Tes
tCallbackInterface testCallbackInterfaceArg); | |
504 [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfac
eArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg); | |
505 [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMe
thod(); | |
506 [CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRa
isesExceptionVoidMethodLongArg(long longArg); | |
507 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); | |
508 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); | |
509 [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(DOMStri
ng stringArg); | |
510 [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(long lo
ngArg); | |
511 [RuntimeEnabled=FeatureName1] void partiallyRuntimeEnabledOverloadedVoidMeth
od(DOMString stringArg); | |
512 [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMeth
od(TestInterface testInterface); | |
513 void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg); | |
514 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); | |
515 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); | |
516 [TreatReturnedNullStringAs=Null] ByteString treatReturnedNullStringAsNullByt
eStringMethod(); | |
517 [TreatReturnedNullStringAs=Undefined] ByteString treatReturnedNullStringAsUn
definedByteStringMethod(); | |
518 [TreatReturnedNullStringAs=Null] ScalarValueString treatReturnedNullStringAs
NullScalarValueStringMethod(); | |
519 [TreatReturnedNullStringAs=Undefined] ScalarValueString treatReturnedNullStr
ingAsUndefinedScalarValueStringMethod(); | |
520 [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEm
ptyArg(TestInterfaceEmpty testInterfaceEmptyArg); | |
521 [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEm
ptyVariadicArg(TestInterfaceEmpty... testInterfaceEmptyArg); | |
522 [TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgD
oubleArg(float floatArg, double doubleArg); | |
523 [Unforgeable] void unforgeableVoidMethod(); | |
524 void voidMethodTestInterfaceGarbageCollectedSequenceArg(sequence<TestInterfa
ceGarbageCollected> testInterfaceGarbageCollectedSequenceArg); | |
525 void voidMethodTestInterfaceGarbageCollectedArrayArg(TestInterfaceGarbageCol
lected[] testInterfaceGarbageCollectedArrayArg); | |
526 void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestI
nterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg); | |
527 void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWill
BeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg); | |
528 | |
529 // Extended attributes on referenced interfaces | |
530 // (not self; self-reference tests at interface themselves) | |
531 attribute TestInterface testInterfaceAttribute; // [ImplementedAs] | |
532 attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribu
te; // [GarbageCollected] | |
533 attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNull
Attribute; // [GarbageCollected] | |
534 attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageColl
ectedAttribute; // [WillBeGarbageCollected] | |
535 attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCol
lectedOrNullAttribute; // [WillBeGarbageCollected] | |
536 | |
537 // Private scripts | |
538 [ImplementedInPrivateScript] void voidMethodImplementedInPrivateScript(); | |
539 [ImplementedInPrivateScript] short shortMethodImplementedInPrivateScript(); | |
540 [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedIn
PrivateScript(short value); | |
541 [ImplementedInPrivateScript] DOMString stringMethodWithStringArgumentImpleme
ntedInPrivateScript(DOMString value); | |
542 [ImplementedInPrivateScript] Node nodeMethodWithNodeArgumentImplementedInPri
vateScript(Node value); | |
543 [ImplementedInPrivateScript] Node nodeMethodWithVariousArgumentsImplementedI
nPrivateScript(Document document, Node node, short value1, double value2, DOMStr
ing string); | |
544 [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute
; | |
545 [ImplementedInPrivateScript] attribute short shortAttribute; | |
546 [ImplementedInPrivateScript] attribute DOMString stringAttribute; | |
547 [ImplementedInPrivateScript] attribute Node nodeAttribute; | |
548 [OnlyExposedToPrivateScript] short methodImplementedInCPPForPrivateScriptOnl
y(short value1, short value2); | |
549 [OnlyExposedToPrivateScript] attribute DOMString attributeImplementedInCPPFo
rPrivateScriptOnly; | |
550 [ImplementedInPrivateScript, OnlyExposedToPrivateScript] short methodForPriv
ateScriptOnly(short value1, short value2); | |
551 [ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString
attributeForPrivateScriptOnly; | |
552 }; | |
OLD | NEW |