| 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 SerializedScriptValue serializedScriptValueAttribute; | |
| 119 attribute any anyAttribute; | |
| 120 // Custom type conversions | |
| 121 attribute Promise promiseAttribute; | |
| 122 attribute Window windowAttribute; | |
| 123 // DOM Node types | |
| 124 attribute Document documentAttribute; | |
| 125 attribute DocumentFragment documentFragmentAttribute; | |
| 126 attribute DocumentType documentTypeAttribute; | |
| 127 attribute Element elementAttribute; | |
| 128 attribute Node nodeAttribute; | |
| 129 attribute ShadowRoot shadowRootAttribute; | |
| 130 // Typed arrays | |
| 131 attribute ArrayBuffer arrayBufferAttribute; | |
| 132 attribute Float32Array float32ArrayAttribute; | |
| 133 attribute Uint8Array uint8ArrayAttribute; | |
| 134 // Exceptions for is_keep_alive_for_gc | |
| 135 readonly attribute TestInterfaceEmpty self; | |
| 136 readonly attribute EventTarget readonlyEventTargetAttribute; | |
| 137 readonly attribute EventTarget? readonlyEventTargetOrNullAttribute; | |
| 138 readonly attribute Window readonlyWindowAttribute; | |
| 139 readonly attribute HTMLElement htmlElementAttribute; | |
| 140 // Arrays | |
| 141 attribute DOMString[] stringArrayAttribute; | |
| 142 attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute; | |
| 143 attribute float[] floatArrayAttribute; | |
| 144 // Nullable attributes | |
| 145 attribute DOMString? stringOrNullAttribute; | |
| 146 attribute long? longOrNullAttribute; | |
| 147 attribute TestInterface? testInterfaceOrNullAttribute; | |
| 148 // Enumerations | |
| 149 attribute TestEnum testEnumAttribute; | |
| 150 // Static attributes | |
| 151 static attribute DOMString staticStringAttribute; | |
| 152 static attribute long staticLongAttribute; | |
| 153 | |
| 154 // Extended attributes | |
| 155 [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute; | |
| 156 [CachedAttribute=isArrayDirty] attribute DOMString[] cachedArrayAttribute; | |
| 157 [CachedAttribute=isStringDirty] attribute DOMString? cachedStringOrNoneAttri
bute; | |
| 158 [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribu
te; | |
| 159 [CallWith=ScriptState] attribute any callWithScriptStateAnyAttribute; | |
| 160 [CallWith=(ExecutionContext,ScriptState)] attribute any callWithExecutionCon
textAndScriptStateAnyAttribute; | |
| 161 [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonl
yDocumentAttribute; // All uses are read only | |
| 162 [Conditional=CONDITION] attribute long conditionalLongAttribute; | |
| 163 // Constructors: FIXME: replace suffix with [ConstructorAttribute] | |
| 164 attribute TestInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribu
te; | |
| 165 [DeprecateAs=deprecatedTestInterfaceEmptyConstructorAttribute] attribute Tes
tInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribute; | |
| 166 [MeasureAs=FeatureName] attribute TestInterfaceEmptyConstructor measureAsFea
tureNameTestInterfaceEmptyConstructorAttribute; | |
| 167 [Custom] attribute object customObjectAttribute; | |
| 168 [Custom=Getter] attribute long customGetterLongAttribute; | |
| 169 [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribut
e; | |
| 170 [Custom=Setter] attribute long customSetterLongAttribute; | |
| 171 [Conditional=CONDITION, Custom] attribute long customLongAttribute; | |
| 172 [CustomElementCallbacks] readonly attribute long customElementsCallbacksRead
onlyLongAttribute; | |
| 173 [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute; | |
| 174 [EnforceRange] attribute long enforceRangeLongAttribute; | |
| 175 [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute; | |
| 176 [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute; | |
| 177 [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImp
lementedAsLongAttribute; | |
| 178 [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customGetterImplementedAsLongAttribute; | |
| 179 [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customSetterImplementedAsLongAttribute; | |
| 180 [MeasureAs=TestFeature] attribute long measureAsLongAttribute; | |
| 181 [NotEnumerable] attribute long notEnumerableLongAttribute; | |
| 182 [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsRea
donlyTestInterfaceEmptyAttribute; | |
| 183 [PutForwards=href] readonly attribute TestNode location; | |
| 184 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; | |
| 185 [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith; | |
| 186 [PutForwards=hrefByteString] readonly attribute TestNode locationByteString; | |
| 187 [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWit
hPerWorldBindings; | |
| 188 [TypeChecking=Interface, PutForwards=href] readonly attribute TestNode locat
ionTypeCheckingInterface; | |
| 189 [RaisesException] attribute long raisesExceptionLongAttribute; | |
| 190 [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute; | |
| 191 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; | |
| 192 [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceE
mptyAttribute; | |
| 193 [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttribut
eRaisesExceptionGetterAnyAttribute; | |
| 194 [Reflect] attribute TestInterface reflectTestInterfaceAttribute; | |
| 195 [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNam
eAttributeTestAttribute; | |
| 196 // [Reflect] exceptional types: exceptional getters, exceptional setters, | |
| 197 // or range checking for unsigned | |
| 198 [Reflect] attribute boolean reflectBooleanAttribute; | |
| 199 [Reflect] attribute long reflectLongAttribute; | |
| 200 [Reflect] attribute unsigned short reflectUnsignedShortAttribute; | |
| 201 [Reflect] attribute unsigned long reflectUnsignedLongAttribute; | |
| 202 // [Reflect] exceptional names | |
| 203 [Reflect] attribute DOMString id; | |
| 204 [Reflect] attribute DOMString name; | |
| 205 [Reflect] attribute DOMString class; | |
| 206 [Reflect=id] attribute DOMString reflectedId; | |
| 207 [Reflect=name] attribute DOMString reflectedName; | |
| 208 [Reflect=class] attribute DOMString reflectedClass; | |
| 209 // Limited value attributes and enumerated attributes | |
| 210 [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribut
e; | |
| 211 [Reflect, ReflectOnly=("Per","Paal","Espen")] attribute DOMString limitedToO
nlyAttribute; | |
| 212 [Reflect=other, ReflectOnly=("Value1","Value2")] attribute DOMString limited
ToOnlyOtherAttribute; | |
| 213 [Reflect, ReflectOnly=("rsa","dsa"), ReflectMissing="rsa"] attribute DOMStri
ng limitedWithMissingDefaultAttribute; | |
| 214 [Reflect, ReflectOnly=("ltr","rtl","auto"), ReflectMissing="auto", ReflectIn
valid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute; | |
| 215 [Reflect, ReflectOnly=("anonymous","use-credentials"), ReflectEmpty="anonymo
us", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribu
te; | |
| 216 [Reflect, ReflectOnly=("empty","missing","invalid","a-normal"), ReflectEmpty
="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute
DOMString limitedWithEmptyMissingInvalidAttribute; | |
| 217 | |
| 218 [Replaceable] readonly attribute long replaceableReadonlyLongAttribute; | |
| 219 [Replaceable, PutForwards=href] readonly attribute TestNode locationReplacea
ble; | |
| 220 [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute; | |
| 221 [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long condition
alRuntimeEnabledLongAttribute; | |
| 222 [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString setterCallWi
thActiveWindowAndFirstWindowStringAttribute; | |
| 223 [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutio
nContextStringAttribute; | |
| 224 [TreatNullAs=EmptyString] attribute DOMString treatNullAsEmptyStringStringAt
tribute; | |
| 225 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; | |
| 226 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; | |
| 227 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; | |
| 228 [TreatReturnedNullStringAs=Undefined, CachedAttribute=isStringDirty] attribu
te DOMString cachedTreatReturnedNullStringAsUndefinedStringAttribute; | |
| 229 [TreatReturnedNullStringAs=Null] attribute ByteString treatReturnedNullStrin
gAsNullByteStringAttribute; | |
| 230 [TreatReturnedNullStringAs=Undefined] attribute ByteString treatReturnedNull
StringAsUndefinedByteStringAttribute; | |
| 231 [TreatReturnedNullStringAs=Null] attribute ScalarValueString treatReturnedNu
llStringAsNullScalarValueStringAttribute; | |
| 232 [TreatReturnedNullStringAs=Undefined] attribute ScalarValueString treatRetur
nedNullStringAsUndefinedScalarValueStringAttribute; | |
| 233 [TypeChecking=Interface] attribute float typeCheckingInterfaceFloatAttribute
; // nop for non-interface types | |
| 234 [TypeChecking=Interface] attribute TestInterface typeCheckingInterfaceTestIn
terfaceAttribute; | |
| 235 [TypeChecking=Interface] attribute TestInterface? typeCheckingInterfaceTestI
nterfaceOrNullAttribute; | |
| 236 [Reflect, URL] attribute DOMString urlStringAttribute; | |
| 237 [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute; | |
| 238 [Unforgeable] attribute long unforgeableLongAttribute; | |
| 239 | |
| 240 | |
| 241 // Methods | |
| 242 // | |
| 243 // Naming convention: | |
| 244 // ReturnType returnTypeMethodTypeName1ArgTypeName2Arg(Type1 typeName1Arg, T
ype2 typeName2Arg); | |
| 245 // E.g., | |
| 246 // void voidMethodStringArgLongArrayArg(DOMString stringArg, long[] longArra
yArg); | |
| 247 void voidMethod(); | |
| 248 static void staticVoidMethod(); | |
| 249 | |
| 250 // Types | |
| 251 // Basic types | |
| 252 Date dateMethod(); | |
| 253 DOMString stringMethod(); | |
| 254 ByteString byteStringMethod(); | |
| 255 ScalarValueString scalarValueStringMethod(); | |
| 256 DOMTimeStamp readonlyDOMTimeStampMethod(); | |
| 257 boolean booleanMethod(); | |
| 258 byte byteMethod(); | |
| 259 double doubleMethod(); | |
| 260 float floatMethod(); | |
| 261 long longMethod(); | |
| 262 long long longLongMethod(); | |
| 263 octet octetMethod(); | |
| 264 short shortMethod(); | |
| 265 unsigned long unsignedLongMethod(); | |
| 266 unsigned long long unsignedLongLongMethod(); | |
| 267 unsigned short unsignedShortMethod(); | |
| 268 | |
| 269 void voidMethodDateArg(Date dateArg); | |
| 270 void voidMethodStringArg(DOMString stringArg); | |
| 271 void voidMethodByteStringArg(ByteString stringArg); | |
| 272 void voidMethodScalarValueStringArg(ScalarValueString scalarValueStringArg); | |
| 273 void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); | |
| 274 void voidMethodBooleanArg(boolean booleanArg); | |
| 275 void voidMethodByteArg(byte byteArg); | |
| 276 void voidMethodDoubleArg(double doubleArg); | |
| 277 void voidMethodFloatArg(float floatArg); | |
| 278 void voidMethodLongArg(long longArg); | |
| 279 void voidMethodLongLongArg(long long longLongArg); | |
| 280 void voidMethodOctetArg(octet octetArg); | |
| 281 void voidMethodShortArg(short shortArg); | |
| 282 void voidMethodUnsignedLongArg(unsigned long unsignedLongArg); | |
| 283 void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg); | |
| 284 void voidMethodUnsignedShortArg(unsigned short unsignedShortArg); | |
| 285 // Interface types | |
| 286 TestInterfaceEmpty testInterfaceEmptyMethod(); | |
| 287 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | |
| 288 void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty
testInterfaceEmptyArg); | |
| 289 // Callback function type | |
| 290 VoidCallbackFunction voidCallbackFunctionMethod(); | |
| 291 AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod(); | |
| 292 void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunc
tionArg); | |
| 293 void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptional
AnyArg anyCallbackFunctionOptionalAnyArgArg); | |
| 294 // Custom type conversions | |
| 295 CompareHow compareHowMethod(); | |
| 296 any anyMethod(); | |
| 297 void voidMethodCompareHowArg(CompareHow compareHowArg); | |
| 298 void voidMethodEventTargetArg(EventTarget eventTargetArg); | |
| 299 void voidMethodAnyArg(any anyArg); | |
| 300 // DOM node types | |
| 301 void voidMethodAttrArg(Attr attrArg); | |
| 302 void voidMethodDocumentArg(Document documentArg); | |
| 303 void voidMethodDocumentTypeArg(DocumentType documentTypeArg); | |
| 304 void voidMethodElementArg(Element elementArg); | |
| 305 void voidMethodNodeArg(Node nodeArg); | |
| 306 // Typed arrays | |
| 307 ArrayBuffer arrayBufferMethod(); | |
| 308 ArrayBufferView arrayBufferViewMethod(); | |
| 309 Float32Array float32ArrayMethod(); | |
| 310 Int32Array int32ArrayMethod(); | |
| 311 Uint8Array uint8ArrayMethod(); | |
| 312 void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg); | |
| 313 void voidMethodArrayBufferOrNullArg(ArrayBuffer? arrayBufferArg); | |
| 314 void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg); | |
| 315 void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg); | |
| 316 void voidMethodInt32ArrayArg(Int32Array int32ArrayArg); | |
| 317 void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg); | |
| 318 // Arrays | |
| 319 long[] longArrayMethod(); | |
| 320 DOMString[] stringArrayMethod(); | |
| 321 TestInterfaceEmpty[] testInterfaceEmptyArrayMethod(); | |
| 322 void voidMethodArrayLongArg(long[] arrayLongArg); | |
| 323 void voidMethodArrayStringArg(DOMString[] arrayStringArg); | |
| 324 void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInte
rfaceEmptyArg); | |
| 325 // Sequences | |
| 326 sequence<long> longSequenceMethod(); | |
| 327 sequence<DOMString> stringSequenceMethod(); | |
| 328 sequence<TestInterfaceEmpty> testInterfaceEmptySequenceMethod(); | |
| 329 void voidMethodSequenceLongArg(sequence<long> longSequenceArg); | |
| 330 void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg); | |
| 331 void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> te
stInterfaceEmptySequenceArg); | |
| 332 // Nullable types | |
| 333 long? nullableLongMethod(); | |
| 334 DOMString? nullableStringMethod(); | |
| 335 TestInterface? nullableTestInterfaceMethod(); | |
| 336 sequence<long>? nullableLongSequenceMethod(); | |
| 337 // Union types | |
| 338 (sequence<long> or DOMString[] or unrestricted double) longSequenceOrDOMStri
ngArrayOrUnrestrictedDoubleMethod(); | |
| 339 // Currently only used on interface type arguments | |
| 340 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI
nterfaceEmptyArg); | |
| 341 // Callback interface types | |
| 342 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn
terfaceArg); | |
| 343 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa
ce optionalTestCallbackInterfaceArg); | |
| 344 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal
lbackInterfaceArg); | |
| 345 // Enumerations | |
| 346 TestEnum testEnumMethod(); | |
| 347 void voidMethodTestEnumArg(TestEnum testEnumTypeArg); | |
| 348 // Exceptional types | |
| 349 Dictionary dictionaryMethod(); | |
| 350 Promise promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString.
.. variadic); | |
| 351 Promise promiseMethodWithoutExceptionState(Dictionary arg1); | |
| 352 SerializedScriptValue serializedScriptValueMethod(); | |
| 353 void voidMethodDictionaryArg(Dictionary dictionaryArg); | |
| 354 void voidMethodPromiseArg(Promise promiseArg); | |
| 355 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri
ptValueArg); | |
| 356 void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequence
Arg); | |
| 357 Promise overloadedPromiseMethod(long arg); | |
| 358 Promise overloadedPromiseMethod(DOMString arg); | |
| 359 | |
| 360 // Arguments | |
| 361 void voidMethodStringArgLongArg(DOMString stringArg, long longArg); | |
| 362 // Optional arguments | |
| 363 void voidMethodOptionalStringArg(optional DOMString optionalStringArg); | |
| 364 void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty opt
ionalTestInterfaceEmptyArg); | |
| 365 void voidMethodOptionalLongArg(optional long optionalLongArg); | |
| 366 DOMString stringMethodOptionalLongArg(optional long optionalLongArg); | |
| 367 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt
ionalLongArg); | |
| 368 long longMethodOptionalLongArg(optional long optionalLongArg); | |
| 369 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo
ngArg); | |
| 370 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional
long optionalLongArg1, optional long optionalLongArg2); | |
| 371 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T
estInterfaceEmpty optionalTestInterfaceEmpty); | |
| 372 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio
nalTestInterfaceEmpty, optional long longArg); | |
| 373 // Optional arguments: exceptional case | |
| 374 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA
rg); | |
| 375 | |
| 376 // Optional arguments with defaults | |
| 377 void voidMethodDefaultByteStringArg(optional ByteString defaultByteStringArg
= "foo"); | |
| 378 void voidMethodDefaultStringArg(optional DOMString defaultStringArg = "foo")
; | |
| 379 void voidMethodDefaultIntegerArgs(optional long defaultLongArg = 10, | |
| 380 optional long long defaultLongLongArg = -1
0, | |
| 381 optional unsigned long defaultUnsignedArg
= 0xFFFFFFFF); | |
| 382 void voidMethodDefaultDoubleArg(optional double defaultDoubleArg = 0.5); | |
| 383 void voidMethodDefaultTrueBooleanArg(optional boolean defaultBooleanArg = tr
ue); | |
| 384 void voidMethodDefaultFalseBooleanArg(optional boolean defaultBooleanArg = f
alse); | |
| 385 void voidMethodDefaultNullableByteStringArg(optional ByteString? defaultStri
ngArg = null); | |
| 386 void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg
= null); | |
| 387 void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defau
ltTestInterfaceArg = null); | |
| 388 | |
| 389 // Variadic operations | |
| 390 void voidMethodVariadicStringArg(DOMString... variadicStringArgs); | |
| 391 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString...
variadicStringArgs); | |
| 392 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT
estInterfaceEmptyArgs); | |
| 393 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf
aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty
Args); | |
| 394 | |
| 395 // Overloaded methods | |
| 396 void overloadedMethodA(long longArg); | |
| 397 void overloadedMethodA(long longArg1, long longArg2); | |
| 398 void overloadedMethodB(long longArg); | |
| 399 void overloadedMethodB(DOMString stringArg, optional long longArg); | |
| 400 void overloadedMethodC(long longArg); | |
| 401 void overloadedMethodC(TestInterfaceEmpty testInterfaceEmptyArg); | |
| 402 void overloadedMethodD(long longArg); | |
| 403 void overloadedMethodD(long[] longArrayArg); | |
| 404 void overloadedMethodE(long longArg); | |
| 405 void overloadedMethodE(TestInterfaceEmpty? testInterfaceEmptyOrNullArg); | |
| 406 void overloadedMethodF(optional DOMString stringArg); | |
| 407 void overloadedMethodF(double doubleArg); | |
| 408 void overloadedMethodG(long longArg); | |
| 409 void overloadedMethodG(optional TestInterfaceEmpty? testInterfaceEmptyOrNull
Arg = null); | |
| 410 void overloadedMethodH(TestInterface testInterfaceArg); | |
| 411 void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg); | |
| 412 void overloadedMethodI(DOMString stringArg); | |
| 413 void overloadedMethodI(double doubleArg); | |
| 414 void overloadedMethodJ(DOMString stringArg); | |
| 415 void overloadedMethodJ(TestDictionary testDictionaryArg); | |
| 416 | |
| 417 | |
| 418 [PerWorldBindings] void overloadedPerWorldBindingsMethod(); | |
| 419 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); | |
| 420 | |
| 421 static void overloadedStaticMethod(long longArg); | |
| 422 static void overloadedStaticMethod(long longArg1, long longArg2); | |
| 423 | |
| 424 // Extended attributes for arguments | |
| 425 // [Clamp] | |
| 426 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho
rtArg); | |
| 427 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA
rg); | |
| 428 // [Default] | |
| 429 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt
ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); | |
| 430 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def
aultUndefinedLongArg); | |
| 431 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr
ing defaultUndefinedStringArg); | |
| 432 // [EnforceRange] | |
| 433 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); | |
| 434 // [TreatNullAs], [TreatUndefinedAs] | |
| 435 void voidMethodTreatNullAsEmptyStringStringArg([TreatNullAs=EmptyString] DOM
String treatNullAsEmptyStringStringArg); | |
| 436 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt
ring treatNullAsNullStringStringArg); | |
| 437 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre
atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin
gStringArg); | |
| 438 | |
| 439 // Extended attributes for methods | |
| 440 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod(); | |
| 441 [CallWith=ScriptState] void callWithScriptStateVoidMethod(); | |
| 442 [CallWith=ScriptState] long callWithScriptStateLongMethod(); | |
| 443 [CallWith=(ScriptState,ExecutionContext)] void callWithScriptStateExecutionC
ontextVoidMethod(); | |
| 444 [CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgum
entsVoidMethod(); | |
| 445 [CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgum
entsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg); | |
| 446 [CallWith=ActiveWindow] void callWithActiveWindow(); | |
| 447 [CallWith=(ActiveWindow,FirstWindow)] void callWithActiveWindowScriptWindow(
); | |
| 448 [CheckSecurity=Node] void checkSecurityForNodeVoidMethod(); | |
| 449 [Conditional=CONDITION] void conditionalConditionVoidMethod(); | |
| 450 [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod(); | |
| 451 [Custom] void customVoidMethod(); | |
| 452 [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod(); | |
| 453 [CustomElementCallbacks] void customElementCallbacksVoidMethod(); | |
| 454 [DeprecateAs=voidMethod] void deprecatedVoidMethod(); | |
| 455 [DoNotCheckSignature] void doNotCheckSignatureVoidMethod(); | |
| 456 [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod(); | |
| 457 [MeasureAs=TestFeature] void measureAsVoidMethod(); | |
| 458 [DeprecateAs=TestFeatureA] void DeprecateAsOverloadedMethod(); | |
| 459 [DeprecateAs=TestFeatureB] void DeprecateAsOverloadedMethod(long arg); | |
| 460 [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(); | |
| 461 [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(long arg
); | |
| 462 [MeasureAs=TestFeatureA] void measureAsOverloadedMethod(); | |
| 463 [MeasureAs=TestFeatureB] void measureAsOverloadedMethod(long arg); | |
| 464 [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod(); | |
| 465 [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod(long arg); | |
| 466 [DeprecateAs=TestFeatureA, MeasureAs=TestFeature] void deprecateAsMeasureAsS
ameValueOverloadedMethod(); | |
| 467 [DeprecateAs=TestFeatureB, MeasureAs=TestFeature] void deprecateAsMeasureAsS
ameValueOverloadedMethod(long arg); | |
| 468 [DeprecateAs=TestFeature, MeasureAs=TestFeatureA] void deprecateAsSameValueM
easureAsOverloadedMethod(); | |
| 469 [DeprecateAs=TestFeature, MeasureAs=TestFeatureB] void deprecateAsSameValueM
easureAsOverloadedMethod(long arg); | |
| 470 [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValue
MeasureAsSameValueOverloadedMethod(); | |
| 471 [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValue
MeasureAsSameValueOverloadedMethod(long arg); | |
| 472 [NotEnumerable] void notEnumerableVoidMethod(); | |
| 473 [PerWorldBindings] void perWorldBindingsVoidMethod(); | |
| 474 [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(Test
InterfaceEmpty testInterfaceEmptyArg); | |
| 475 [RaisesException] void raisesExceptionVoidMethod(); | |
| 476 [RaisesException] DOMString raisesExceptionStringMethod(); | |
| 477 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); | |
| 478 [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(Tes
tCallbackInterface testCallbackInterfaceArg); | |
| 479 [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfac
eArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg); | |
| 480 [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMe
thod(); | |
| 481 [CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRa
isesExceptionVoidMethodLongArg(long longArg); | |
| 482 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); | |
| 483 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); | |
| 484 [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(DOMStri
ng stringArg); | |
| 485 [RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(long lo
ngArg); | |
| 486 [RuntimeEnabled=FeatureName1] void partiallyRuntimeEnabledOverloadedVoidMeth
od(DOMString stringArg); | |
| 487 [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMeth
od(TestInterface testInterface); | |
| 488 void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg); | |
| 489 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); | |
| 490 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); | |
| 491 [TreatReturnedNullStringAs=Null] ByteString treatReturnedNullStringAsNullByt
eStringMethod(); | |
| 492 [TreatReturnedNullStringAs=Undefined] ByteString treatReturnedNullStringAsUn
definedByteStringMethod(); | |
| 493 [TreatReturnedNullStringAs=Null] ScalarValueString treatReturnedNullStringAs
NullScalarValueStringMethod(); | |
| 494 [TreatReturnedNullStringAs=Undefined] ScalarValueString treatReturnedNullStr
ingAsUndefinedScalarValueStringMethod(); | |
| 495 [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEm
ptyArg(TestInterfaceEmpty testInterfaceEmptyArg); | |
| 496 [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEm
ptyVariadicArg(TestInterfaceEmpty... testInterfaceEmptyArg); | |
| 497 [TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgD
oubleArg(float floatArg, double doubleArg); | |
| 498 [Unforgeable] void unforgeableVoidMethod(); | |
| 499 | |
| 500 // Extended attributes on referenced interfaces | |
| 501 // (not self; self-reference tests at interface themselves) | |
| 502 attribute TestInterface testInterfaceAttribute; // [ImplementedAs] | |
| 503 | |
| 504 // Private scripts | |
| 505 [ImplementedInPrivateScript] void voidMethodImplementedInPrivateScript(); | |
| 506 [ImplementedInPrivateScript] short shortMethodImplementedInPrivateScript(); | |
| 507 [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedIn
PrivateScript(short value); | |
| 508 [ImplementedInPrivateScript] DOMString stringMethodWithStringArgumentImpleme
ntedInPrivateScript(DOMString value); | |
| 509 [ImplementedInPrivateScript] Node nodeMethodWithNodeArgumentImplementedInPri
vateScript(Node value); | |
| 510 [ImplementedInPrivateScript] Node nodeMethodWithVariousArgumentsImplementedI
nPrivateScript(Document document, Node node, short value1, double value2, DOMStr
ing string); | |
| 511 [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute
; | |
| 512 [ImplementedInPrivateScript] attribute short shortAttribute; | |
| 513 [ImplementedInPrivateScript] attribute DOMString stringAttribute; | |
| 514 [ImplementedInPrivateScript] attribute Node nodeAttribute; | |
| 515 [OnlyExposedToPrivateScript] short methodImplementedInCPPForPrivateScriptOnl
y(short value1, short value2); | |
| 516 [OnlyExposedToPrivateScript] attribute DOMString attributeImplementedInCPPFo
rPrivateScriptOnly; | |
| 517 [ImplementedInPrivateScript, OnlyExposedToPrivateScript] short methodForPriv
ateScriptOnly(short value1, short value2); | |
| 518 [ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString
attributeForPrivateScriptOnly; | |
| 519 [ImplementedInPrivateScript] attribute TestEnum enumForPrivateScript; | |
| 520 }; | |
| OLD | NEW |