| 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 TestObjectPython { | |
| 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 | |
| 55 // Extended attributes | |
| 56 [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1; | |
| 57 [RuntimeEnabled=FeatureName] const short FEATURE_ENABLED_CONST = 1; | |
| 58 [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1; | |
| 59 | |
| 60 | |
| 61 // Attributes | |
| 62 // | |
| 63 // Naming convention: | |
| 64 // [ExtAttr] attribute Type extAttrTypeNameAttribute; | |
| 65 // E.g., | |
| 66 // [Foo] attribute DOMString? fooStringOrNullAttribute | |
| 67 // | |
| 68 // Type name reference: | |
| 69 // http://heycam.github.io/webidl/#dfn-type-name | |
| 70 // | |
| 71 // TestInterfaceEmpty is used as a stub interface type, for testing behavior | |
| 72 // that should not depend on particular type (beyond "interface or not"). | |
| 73 // read only | |
| 74 readonly attribute DOMString readonlyStringAttribute; | |
| 75 readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute; | |
| 76 readonly attribute long readonlyLongAttribute; | |
| 77 // Basic types | |
| 78 attribute Date dateAttribute; | |
| 79 attribute DOMString stringAttribute; | |
| 80 readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute; // FIXME: Per
l CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove readon
ly once moved to Python-only | |
| 81 attribute boolean booleanAttribute; | |
| 82 attribute byte byteAttribute; | |
| 83 attribute double doubleAttribute; | |
| 84 attribute float floatAttribute; | |
| 85 attribute long longAttribute; | |
| 86 attribute long long longLongAttribute; | |
| 87 attribute octet octetAttribute; | |
| 88 attribute short shortAttribute; | |
| 89 attribute unsigned long unsignedLongAttribute; | |
| 90 attribute unsigned long long unsignedLongLongAttribute; | |
| 91 attribute unsigned short unsignedShortAttribute; | |
| 92 // Interface type | |
| 93 attribute TestInterfaceEmpty testInterfaceEmptyAttribute; | |
| 94 // Self-reference | |
| 95 attribute TestObjectPython testObjectPythonAttribute; | |
| 96 // Callback function type | |
| 97 attribute VoidCallbackFunction voidCallbackFunctionAttribute; | |
| 98 attribute AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyAr
gAttribute; | |
| 99 // Names that begin with an acronym | |
| 100 attribute long cssAttribute; | |
| 101 attribute long imeAttribute; | |
| 102 attribute long svgAttribute; | |
| 103 attribute long xmlAttribute; | |
| 104 // Non-wrapper types | |
| 105 attribute NodeFilter nodeFilterAttribute; | |
| 106 attribute SerializedScriptValue serializedScriptValueAttribute; | |
| 107 attribute any anyAttribute; | |
| 108 // Custom type conversions | |
| 109 attribute Promise promiseAttribute; | |
| 110 attribute Window windowAttribute; | |
| 111 // DOM Node types | |
| 112 attribute Document documentAttribute; | |
| 113 attribute DocumentFragment documentFragmentAttribute; | |
| 114 attribute DocumentType documentTypeAttribute; | |
| 115 attribute Element elementAttribute; | |
| 116 attribute Node nodeAttribute; | |
| 117 attribute ShadowRoot shadowRootAttribute; | |
| 118 // Typed arrays | |
| 119 attribute ArrayBuffer arrayBufferAttribute; | |
| 120 attribute Float32Array float32ArrayAttribute; | |
| 121 attribute Uint8Array uint8ArrayAttribute; | |
| 122 // Exceptions for is_keep_alive_for_gc | |
| 123 readonly attribute TestInterfaceEmpty self; | |
| 124 readonly attribute EventTarget readonlyEventTargetAttribute; | |
| 125 readonly attribute EventTarget? readonlyEventTargetOrNullAttribute; | |
| 126 readonly attribute Window readonlyWindowAttribute; | |
| 127 readonly attribute HTMLCollection htmlCollectionAttribute; | |
| 128 readonly attribute HTMLElement htmlElementAttribute; | |
| 129 // Arrays | |
| 130 attribute DOMString[] stringArrayAttribute; | |
| 131 attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute; | |
| 132 attribute float[] floatArrayAttribute; | |
| 133 // Nullable attributes | |
| 134 attribute DOMString? stringOrNullAttribute; | |
| 135 attribute long? longOrNullAttribute; | |
| 136 attribute TestInterface? testInterfaceOrNullAttribute; | |
| 137 // Enumerations | |
| 138 attribute TestEnum testEnumAttribute; | |
| 139 // Static attributes | |
| 140 static attribute DOMString staticStringAttribute; | |
| 141 static attribute long staticLongAttribute; | |
| 142 // Constructors | |
| 143 attribute TestObjectAConstructor testObjectAConstructorAttribute; | |
| 144 // Exceptional type | |
| 145 attribute EventHandler eventHandlerAttribute; | |
| 146 | |
| 147 // Extended attributes | |
| 148 [ActivityLogging=ForAllWorlds] attribute long activityLoggingAccessForAllWor
ldsLongAttribute; | |
| 149 [ActivityLogging=GetterForAllWorlds] attribute long activityLoggingGetterFor
AllWorldsLongAttribute; | |
| 150 [ActivityLogging=SetterForAllWorlds] attribute long activityLoggingSetterFor
AllWorldsLongAttribute; | |
| 151 [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute; | |
| 152 [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribu
te; | |
| 153 [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonl
yDocumentAttribute; // All uses are read only | |
| 154 [Conditional=CONDITION] attribute long conditionalLongAttribute; | |
| 155 [Conditional=CONDITION_1&CONDITION_2] attribute long conditionalAndLongAttri
bute; | |
| 156 [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttrib
ute; | |
| 157 [Custom] attribute object customObjectAttribute; | |
| 158 [Custom=Getter] attribute long customGetterLongAttribute; | |
| 159 [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribut
e; | |
| 160 [Custom=Setter] attribute long customSetterLongAttribute; | |
| 161 [Conditional=CONDITION, Custom] attribute long customLongAttribute; | |
| 162 [CustomElementCallbacks] readonly attribute long customElementsCallbacksRead
onlyLongAttribute; | |
| 163 [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute; | |
| 164 [EnforceRange] attribute long enforceRangeLongAttribute; | |
| 165 [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute; | |
| 166 [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute; | |
| 167 [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImp
lementedAsLongAttribute; | |
| 168 [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customGetterImplementedAsLongAttribute; | |
| 169 [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customSetterImplementedAsLongAttribute; | |
| 170 [MeasureAs=TestFeature] attribute long measureAsLongAttribute; | |
| 171 [NotEnumerable] attribute long notEnumerableLongAttribute; | |
| 172 [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribut
e; | |
| 173 [PerWorldBindings] attribute long perWorldBindingsLongAttribute; | |
| 174 [PerWorldBindings] readonly attribute long perWorldBindingsReadonlyLongAttri
bute; // Separate read only attribute to check attribute configuration | |
| 175 [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsRea
donlyTestInterfaceEmptyAttribute; | |
| 176 [ActivityLogging=ForAllWorlds, PerWorldBindings] attribute long activityLogg
ingAccessPerWorldBindingsLongAttribute; | |
| 177 [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] attribute long activit
yLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute; | |
| 178 [ActivityLogging=GetterForAllWorlds, PerWorldBindings] attribute long activi
tyLoggingGetterPerWorldBindingsLongAttribute; | |
| 179 [ActivityLogging=GetterForIsolatedWorlds, PerWorldBindings] attribute long a
ctivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute; | |
| 180 [PutForwards=href] readonly attribute TestNode location; | |
| 181 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; | |
| 182 [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith; | |
| 183 [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWit
hPerWorldBindings; | |
| 184 [PutForwards=attr1] readonly attribute TestInterfaceWillBeGarbageCollected l
ocationWillBeGarbageCollected; | |
| 185 [RaisesException] attribute long raisesExceptionLongAttribute; | |
| 186 [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute; | |
| 187 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; | |
| 188 [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceE
mptyAttribute; | |
| 189 [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttribut
eRaisesExceptionGetterAnyAttribute; | |
| 190 [Reflect] attribute TestInterface reflectTestInterfaceAttribute; | |
| 191 [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNam
eAttributeTestAttribute; | |
| 192 // [Reflect] exceptional types: exceptional getters, exceptional setters, | |
| 193 // or range checking for unsigned | |
| 194 [Reflect] attribute boolean reflectBooleanAttribute; | |
| 195 [Reflect] attribute long reflectLongAttribute; | |
| 196 [Reflect] attribute unsigned short reflectUnsignedShortAttribute; | |
| 197 [Reflect] attribute unsigned long reflectUnsignedLongAttribute; | |
| 198 // [Reflect] exceptional names | |
| 199 [Reflect] attribute DOMString id; | |
| 200 [Reflect] attribute DOMString name; | |
| 201 [Reflect] attribute DOMString class; | |
| 202 [Reflect=id] attribute DOMString reflectedId; | |
| 203 [Reflect=name] attribute DOMString reflectedName; | |
| 204 [Reflect=class] attribute DOMString reflectedClass; | |
| 205 // Limited value attributes and enumerated attributes | |
| 206 [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribut
e; | |
| 207 [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnl
yAttribute; | |
| 208 [Reflect=Other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedT
oOnlyOtherAttribute; | |
| 209 [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString
limitedWithMissingDefaultAttribute; | |
| 210 [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInva
lid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute; | |
| 211 [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous
", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute
; | |
| 212 [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="
empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute D
OMString limitedWithEmptyMissingInvalidAttribute; | |
| 213 | |
| 214 [Replaceable] readonly attribute long replaceableReadonlyLongAttribute; | |
| 215 [Replaceable, PutForwards=href] readonly attribute TestNode locationReplacea
ble; | |
| 216 [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute; | |
| 217 [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long p
erContextEnabledRuntimeEnabledLongAttribute; | |
| 218 [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long condition
alRuntimeEnabledLongAttribute; | |
| 219 [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString setterCallWith
ActiveWindowAndFirstWindowStringAttribute; | |
| 220 [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutio
nContextStringAttribute; | |
| 221 [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // no
p for non-interface types | |
| 222 [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterface
Attribute; | |
| 223 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; | |
| 224 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; | |
| 225 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; | |
| 226 [Reflect, URL] attribute DOMString urlStringAttribute; | |
| 227 [Reflect=ReflectUrlAttribute, URL] attribute DOMString urlStringAttribute; | |
| 228 [Unforgeable] attribute long unforgeableLongAttribute; | |
| 229 [Reflect="ReflectUrlAttributeAsAString"] attribute DOMString anotherStringAt
tribute; | |
| 230 | |
| 231 | |
| 232 // Methods | |
| 233 // | |
| 234 // Naming convention: | |
| 235 // ReturnType returnTypeMethodTypeName1ArgTypeName2Arg(Type1 typeName1Arg, T
ype2 typeName2Arg); | |
| 236 // E.g., | |
| 237 // void voidMethodStringArgLongArrayArg(DOMString stringArg, long[] longArra
yArg); | |
| 238 void voidMethod(); | |
| 239 static void staticVoidMethod(); | |
| 240 | |
| 241 // Types | |
| 242 // Basic types | |
| 243 Date dateMethod(); | |
| 244 DOMString stringMethod(); | |
| 245 DOMTimeStamp readonlyDOMTimeStampMethod(); | |
| 246 boolean booleanMethod(); | |
| 247 byte byteMethod(); | |
| 248 double doubleMethod(); | |
| 249 float floatMethod(); | |
| 250 long longMethod(); | |
| 251 long long longLongMethod(); | |
| 252 octet octetMethod(); | |
| 253 short shortMethod(); | |
| 254 unsigned long unsignedLongMethod(); | |
| 255 unsigned long long unsignedLongLongMethod(); | |
| 256 unsigned short unsignedShortMethod(); | |
| 257 | |
| 258 void voidMethodDateArg(Date dateArg); | |
| 259 void voidMethodStringArg(DOMString stringArg); | |
| 260 // void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); // FIXME: P
erl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; uncomment o
nce moved to Python-only | |
| 261 void voidMethodBooleanArg(boolean booleanArg); | |
| 262 void voidMethodByteArg(byte byteArg); | |
| 263 void voidMethodDoubleArg(double doubleArg); | |
| 264 void voidMethodFloatArg(float floatArg); | |
| 265 void voidMethodLongArg(long longArg); | |
| 266 void voidMethodLongLongArg(long long longLongArg); | |
| 267 void voidMethodOctetArg(octet octetArg); | |
| 268 void voidMethodShortArg(short shortArg); | |
| 269 void voidMethodUnsignedLongArg(unsigned long unsignedLongArg); | |
| 270 void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg); | |
| 271 void voidMethodUnsignedShortArg(unsigned short unsignedShortArg); | |
| 272 // Interface types | |
| 273 TestInterfaceEmpty testInterfaceEmptyMethod(); | |
| 274 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | |
| 275 void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty
testInterfaceEmptyArg); | |
| 276 // Callback function type | |
| 277 VoidCallbackFunction voidCallbackFunctionMethod(); | |
| 278 AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod(); | |
| 279 void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunc
tionArg); | |
| 280 void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptional
AnyArg anyCallbackFunctionOptionalAnyArgArg); | |
| 281 // Custom type conversions | |
| 282 CompareHow compareHowMethod(); | |
| 283 any anyMethod(); | |
| 284 void voidMethodCompareHowArg(CompareHow compareHowArg); | |
| 285 void voidMethodEventTargetArg(EventTarget eventTargetArg); | |
| 286 void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryLi
stListenerArg); | |
| 287 void voidMethodAnyArg(any anyArg); | |
| 288 // DOM node types | |
| 289 void voidMethodAttrArg(Attr attrArg); | |
| 290 void voidMethodDocumentArg(Document documentArg); | |
| 291 void voidMethodDocumentTypeArg(DocumentType documentTypeArg); | |
| 292 void voidMethodElementArg(Element elementArg); | |
| 293 void voidMethodNodeArg(Node nodeArg); | |
| 294 // Typed arrays | |
| 295 ArrayBuffer arrayBufferMethod(); | |
| 296 ArrayBufferView arrayBufferViewMethod(); | |
| 297 Float32Array float32ArrayMethod(); | |
| 298 Int32Array int32ArrayMethod(); | |
| 299 Uint8Array uint8ArrayMethod(); | |
| 300 void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg); | |
| 301 void voidMethodArrayBufferOrNullArg(ArrayBuffer? arrayBufferArg); | |
| 302 void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg); | |
| 303 void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg); | |
| 304 void voidMethodInt32ArrayArg(Int32Array int32ArrayArg); | |
| 305 void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg); | |
| 306 // Arrays | |
| 307 long[] longArrayMethod(); | |
| 308 DOMString[] stringArrayMethod(); | |
| 309 TestInterfaceEmpty[] testInterfaceEmptyArrayMethod(); | |
| 310 void voidMethodArrayLongArg(long[] arrayLongArg); | |
| 311 void voidMethodArrayStringArg(DOMString[] arrayStringArg); | |
| 312 void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInte
rfaceEmptyArg); | |
| 313 // Sequences | |
| 314 sequence<long> longSequenceMethod(); | |
| 315 sequence<DOMString> stringSequenceMethod(); | |
| 316 sequence<TestInterfaceEmpty> testInterfaceEmptySequenceMethod(); | |
| 317 void voidMethodSequenceLongArg(sequence<long> longSequenceArg); | |
| 318 void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg); | |
| 319 void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> te
stInterfaceEmptySequenceArg); | |
| 320 // Nullable types | |
| 321 // Currently only used on interface type arguments | |
| 322 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI
nterfaceEmptyArg); | |
| 323 // Callback interface types | |
| 324 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn
terfaceArg); | |
| 325 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa
ce optionalTestCallbackInterfaceArg); | |
| 326 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal
lbackInterfaceArg); | |
| 327 // Enumerations | |
| 328 TestEnum testEnumMethod(); | |
| 329 void voidMethodTestEnumArg(TestEnum testEnumTypeArg); | |
| 330 // Exceptional types | |
| 331 Dictionary dictionaryMethod(); | |
| 332 NodeFilter nodeFilterMethod(); | |
| 333 Promise promiseMethod(); | |
| 334 SerializedScriptValue serializedScriptValueMethod(); | |
| 335 XPathNSResolver xPathNSResolverMethod(); | |
| 336 void voidMethodDictionaryArg(Dictionary dictionaryArg); | |
| 337 void voidMethodEventListenerArg(EventListener eventListenerArg); | |
| 338 void voidMethodNodeFilterArg(NodeFilter nodeFilterArg); | |
| 339 void voidMethodPromiseArg(Promise promiseArg); | |
| 340 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri
ptValueArg); | |
| 341 void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg); | |
| 342 void voidMethodSequenceDictionaryArg(sequence<Dictionary> dictionarySequence
Arg); | |
| 343 | |
| 344 // Arguments | |
| 345 void voidMethodStringArgLongArg(DOMString stringArg, long longArg); | |
| 346 // Optional arguments | |
| 347 void voidMethodOptionalStringArg(optional DOMString optionalStringArg); | |
| 348 void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty opt
ionalTestInterfaceEmptyArg); | |
| 349 void voidMethodOptionalLongArg(optional long optionalLongArg); | |
| 350 DOMString stringMethodOptionalLongArg(optional long optionalLongArg); | |
| 351 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt
ionalLongArg); | |
| 352 long longMethodOptionalLongArg(optional long optionalLongArg); | |
| 353 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo
ngArg); | |
| 354 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional
long optionalLongArg1, optional long optionalLongArg2); | |
| 355 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T
estInterfaceEmpty optionalTestInterfaceEmpty); | |
| 356 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio
nalTestInterfaceEmpty, optional long longArg); | |
| 357 // Optional arguments: exceptional case | |
| 358 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA
rg); | |
| 359 | |
| 360 // Variadic operations | |
| 361 void voidMethodVariadicStringArg(DOMString... variadicStringArgs); | |
| 362 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString...
variadicStringArgs); | |
| 363 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT
estInterfaceEmptyArgs); | |
| 364 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf
aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty
Args); | |
| 365 // [WillBeGarbageCollected] | |
| 366 void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceW
illBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg); | |
| 367 | |
| 368 // Overloaded methods | |
| 369 void overloadedMethodA(long longArg); | |
| 370 void overloadedMethodA(long longArg1, long longArg2); | |
| 371 void overloadedMethodB(long longArg); | |
| 372 void overloadedMethodB(long longArg1, optional long longArg2); | |
| 373 void overloadedMethodC(long longArg); | |
| 374 void overloadedMethodC(long longArg, long... longArgs); | |
| 375 void overloadedMethodD(long longArg); | |
| 376 void overloadedMethodD(TestInterfaceEmpty testInterfaceEmptyArg); | |
| 377 void overloadedMethodE(long longArg); | |
| 378 void overloadedMethodE(long[] longArrayArg); | |
| 379 void overloadedMethodF(long longArg); | |
| 380 void overloadedMethodF(TestInterfaceEmpty? testInterfaceEmptyNullableArg); | |
| 381 void overloadedMethodG(); | |
| 382 void overloadedMethodG([StrictTypeChecking] DOMString strictTypeCheckingStri
ngArg); | |
| 383 void overloadedMethodH(); | |
| 384 void overloadedMethodH(TestCallbackInterface testCallbackInterfaceArg); | |
| 385 | |
| 386 [PerWorldBindings] void overloadedPerWorldBindingsMethod(); | |
| 387 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); | |
| 388 | |
| 389 static void overloadedStaticMethod(long longArg); | |
| 390 static void overloadedStaticMethod(long longArg1, long longArg2); | |
| 391 | |
| 392 // Extended attributes for arguments | |
| 393 // [Clamp] | |
| 394 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho
rtArg); | |
| 395 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA
rg); | |
| 396 // [Default] | |
| 397 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt
ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); | |
| 398 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def
aultUndefinedLongArg); | |
| 399 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr
ing defaultUndefinedStringArg); | |
| 400 void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMS
tring defaultNullStringStringArg); | |
| 401 // [EnforceRange] | |
| 402 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); | |
| 403 // [TreatNullAs], [TreatUndefinedAs] | |
| 404 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt
ring treatNullAsNullStringStringArg); | |
| 405 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre
atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin
gStringArg); | |
| 406 | |
| 407 // Extended attributes for methods | |
| 408 [ActivityLogging=ForAllWorlds] void activityLoggingAccessForAllWorldsMethod(
); | |
| 409 [CallWith=ScriptState] void callWithScriptStateVoidMethod(); | |
| 410 [CallWith=ScriptState] long callWithScriptStateLongMethod(); | |
| 411 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod(); | |
| 412 [CallWith=ScriptState&ExecutionContext] void callWithScriptStateExecutionCon
textVoidMethod(); | |
| 413 [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumen
tsVoidMethod(); | |
| 414 [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumen
tsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg); | |
| 415 [CallWith=ActiveWindow] void callWithActiveWindow(); | |
| 416 [CallWith=ActiveWindow&FirstWindow] void callWithActiveWindowScriptWindow(); | |
| 417 [CheckSecurity=Node] void checkSecurityForNodeVoidMethod(); | |
| 418 [Conditional=CONDITION] void conditionalConditionVoidMethod(); | |
| 419 [Conditional=CONDITION_1&CONDITION_2] void conditionalCondition1AndCondition
2VoidMethod(); | |
| 420 [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod(); | |
| 421 [Custom] void customVoidMethod(); | |
| 422 [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod(); | |
| 423 [CustomElementCallbacks] void customElementCallbacksVoidMethod(); | |
| 424 [DeprecateAs=voidMethod] void deprecatedVoidMethod(); | |
| 425 [DoNotCheckSignature] void doNotCheckSignatureVoidMethod(); | |
| 426 [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod(); | |
| 427 [MeasureAs=TestFeature] void measureAsVoidMethod(); | |
| 428 [NotEnumerable] void notEnumerableVoidMethod(); | |
| 429 [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod(); | |
| 430 [PerWorldBindings] void perWorldBindingsVoidMethod(); | |
| 431 [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(Test
InterfaceEmpty testInterfaceEmptyArg); | |
| 432 [ActivityLogging=ForAllWorlds, PerWorldBindings] void activityLoggingForAllW
orldsPerWorldBindingsVoidMethod(); | |
| 433 [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] void activityLoggingFo
rIsolatedWorldsPerWorldBindingsVoidMethod(); | |
| 434 [RaisesException] void raisesExceptionVoidMethod(); | |
| 435 [RaisesException] DOMString raisesExceptionStringMethod(); | |
| 436 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); | |
| 437 [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(Tes
tCallbackInterface testCallbackInterfaceArg); | |
| 438 [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfac
eArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg); | |
| 439 [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMe
thod(); | |
| 440 [ReadOnly] void readOnlyVoidMethod(); | |
| 441 [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod(); | |
| 442 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); | |
| 443 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); | |
| 444 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyArg(
TestInterfaceEmpty testInterfaceEmptyArg); | |
| 445 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNu
llArg(TestInterfaceEmpty? testInterfaceEmptyArg); | |
| 446 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); | |
| 447 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); | |
| 448 [Unforgeable] void unforgeableVoidMethod(); | |
| 449 // [WillBeGarbageCollected] | |
| 450 void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestI
nterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg); | |
| 451 void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWill
BeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg); | |
| 452 | |
| 453 // Extended attributes on referenced interfaces | |
| 454 // (not self; self-reference tests at interface themselves) | |
| 455 attribute TestInterfacePython testInterfacePythonAttribute; // [ImplementedA
s] | |
| 456 attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageColl
ectedAttribute; // [WillBeGarbageCollected] | |
| 457 attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCol
lectedOrNullAttribute; // [WillBeGarbageCollected] | |
| 458 }; | |
| OLD | NEW |