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