OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * | 4 * |
4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions |
6 * met: | 7 * are met: |
7 * | 8 * |
8 * * Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 11 * 2. Redistributions in binary form must reproduce the above copyright |
11 * copyright notice, this list of conditions and the following disclaimer | 12 * notice, this list of conditions and the following disclaimer in the |
12 * in the documentation and/or other materials provided with the | 13 * documentation and/or other materials provided with the distribution. |
13 * distribution. | 14 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
14 * * Neither the name of Google Inc. nor the names of its | 15 * its contributors may be used to endorse or promote products derived |
15 * contributors may be used to endorse or promote products derived from | 16 * from this software without specific prior written permission. |
16 * this software without specific prior written permission. | |
17 * | 17 * |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 */ | 28 */ |
30 | 29 |
31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"}; | 30 // This IDL file is for testing the bindings code generator and for tracking |
32 | 31 // changes in its ouput. |
33 callback VoidCallbackFunction = void (); | 32 |
34 callback AnyCallbackFunctionOptionalAnyArg = any (optional any optionalAnyArg); | 33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" }; |
| 34 |
| 35 callback TestCallbackFunction = void (TestEnumType formal1, TestObject formal2); |
35 | 36 |
36 // No extended attributes on the interface; those go in TestInterface.idl | 37 // No extended attributes on the interface; those go in TestInterface.idl |
37 interface TestObject { | 38 interface TestObject : EventTarget { |
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 | 39 // Attributes |
62 // | 40 readonly attribute long readOnlyLongAttr; |
63 // Naming convention: | 41 readonly attribute DOMString readOnlyStringAttr; |
64 // [ExtAttr] attribute Type extAttrTypeNameAttribute; | 42 readonly attribute TestObject readOnlyTestObjectAttr; |
65 // E.g., | 43 static readonly attribute long staticReadOnlyLongAttr; |
66 // [Foo] attribute DOMString? fooStringOrNullAttribute | 44 static attribute DOMString staticStringAttr; |
67 // | 45 attribute TestSubObjConstructor TestSubObj; |
68 // Type name reference: | 46 attribute TestEnumType enumAttr; |
69 // http://heycam.github.io/webidl/#dfn-type-name | 47 readonly attribute TestEnumType readOnlyEnumAttr; |
70 // | 48 attribute byte byteAttr; |
71 // TestInterfaceEmpty is used as a stub interface type, for testing behavior | 49 attribute octet octetAttr; |
72 // that should not depend on particular type (beyond "interface or not"). | 50 attribute short shortAttr; |
73 // read only | 51 attribute unsigned short unsignedShortAttr; |
74 readonly attribute DOMString readonlyStringAttribute; | 52 attribute long longAttr; |
75 readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute; | 53 attribute long long longLongAttr; |
76 readonly attribute long readonlyLongAttribute; | 54 attribute unsigned long long unsignedLongLongAttr; |
77 // Basic types | 55 attribute DOMString stringAttr; |
78 attribute Date dateAttribute; | 56 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
; |
79 attribute DOMString stringAttribute; | 57 [TreatNullAs=NullString, TreatUndefinedAs=NullString] attribute DOMString tr
eatNullAsNullStringTreatUndefinedAsNullStringStringAttr; |
80 attribute DOMTimeStamp domTimeStampAttribute; | 58 attribute EventHandler eventHandlerAttr; |
81 attribute boolean booleanAttribute; | 59 [MeasureAs=TestFeature] attribute TestObject testObjAttr; |
82 attribute byte byteAttribute; | 60 [ExposeJSAccessors] attribute DOMString attrWithJSGetterAndSetter; |
83 attribute double doubleAttribute; | 61 [MeasureAs=TestFeature] attribute TestSubObjConstructor TestSubObjMeasured; |
84 attribute float floatAttribute; | 62 |
85 attribute long longAttribute; | 63 // Name starting with an acronym |
86 attribute long long longLongAttribute; | 64 attribute TestObject XMLObjAttr; |
87 attribute octet octetAttribute; | 65 |
88 attribute short shortAttribute; | 66 // Reflected DOM attributes |
89 attribute unsigned long unsignedLongAttribute; | 67 [Reflect] attribute DOMString reflectedStringAttr; |
90 attribute unsigned long long unsignedLongLongAttribute; | 68 [Reflect, TreatNullAs=NullString] attribute DOMString reflectedTreatNullAsNu
llStringStringAttr; |
91 attribute unsigned short unsignedShortAttribute; | 69 [Reflect, TreatNullAs=NullString, TreatUndefinedAs=NullString] attribute DOM
String reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr; |
92 // Interface type | 70 [Reflect] attribute long reflectedIntegralAttr; |
93 attribute TestInterfaceEmpty testInterfaceEmptyAttribute; | 71 [Reflect] attribute unsigned long reflectedUnsignedIntegralAttr; |
94 // Self-reference | 72 [Reflect] attribute boolean reflectedBooleanAttr; |
95 attribute TestObject testObjectAttribute; | 73 [Reflect, URL] attribute DOMString reflectedURLAttr; |
96 // Callback function type | 74 [Reflect, TreatNullAs=NullString, URL] attribute DOMString reflectedTreatNul
lAsNullStringURLAttr; |
97 attribute VoidCallbackFunction voidCallbackFunctionAttribute; | 75 [Reflect, TreatNullAs=NullString, TreatUndefinedAs=NullString, URL] attribut
e DOMString reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttr; |
98 attribute AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyAr
gAttribute; | 76 [Reflect=customContentStringAttr] attribute DOMString reflectedCustomStringA
ttr; |
99 // Names that begin with an acronym | 77 [Reflect=customContentStringAttr, TreatNullAs=NullString] attribute DOMStrin
g reflectedTreatNullAsNullStringCustomStringAttr; |
100 attribute long cssAttribute; | 78 [Reflect=customContentStringAttr, TreatNullAs=NullString, TreatUndefinedAs=N
ullString] attribute DOMString reflectedTreatNullAsNullStringTreatUndefinedAsNul
lStringCustomStringAttr; |
101 attribute long imeAttribute; | 79 [Reflect=customContentIntegralAttr] attribute long reflectedCustomIntegralAt
tr; |
102 attribute long svgAttribute; | 80 [Reflect=customContentBooleanAttr] attribute boolean reflectedCustomBooleanA
ttr; |
103 attribute long xmlAttribute; | 81 [Reflect=customContentURLAttr, URL] attribute DOMString reflectedCustomURLAt
tr; |
104 // Non-wrapper types | 82 [Reflect=customContentURLAttr, TreatNullAs=NullString, URL] attribute DOMStr
ing reflectedTreatNullAsNullStringCustomURLAttr; |
105 attribute NodeFilter nodeFilterAttribute; | 83 [Reflect=customContentURLAttr, TreatNullAs=NullString, TreatUndefinedAs=Null
String, URL] attribute DOMString reflectedTreatNullAsNullStringTreatUndefinedAsN
ullStringCustomURLAttr; |
106 attribute SerializedScriptValue serializedScriptValueAttribute; | 84 [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribut
e; |
| 85 [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnl
yAttribute; |
| 86 [Reflect=Other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedT
oOnlyOtherAttribute; |
| 87 [Reflect, ReflectOnly="rsa" | "dsa", ReflectMissing="rsa"] attribute DOMStri
ng limitedWithMissingDefaultAttribute; |
| 88 [Reflect, ReflectOnly="ltr" | "rtl" | "auto", ReflectMissing="auto", Reflect
Invalid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute; |
| 89 [Reflect, ReflectOnly="left" | "right", ReflectMissing="left", ReflectInvali
d="left"] attribute DOMString limitedWithInvalidAndMissingDefaultAttribute; |
| 90 [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous
", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute
; |
| 91 [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="
empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute D
OMString limitedWithEmptyMissingInvalidAttribute; |
| 92 |
| 93 // TypedArray attribute |
| 94 attribute Float32Array typedArrayAttr; |
| 95 |
| 96 // Methods |
| 97 void voidMethod(); |
| 98 void voidMethodWithArgs(long longArg, DOMString strArg, TestObject objArg
); |
| 99 long longMethod(); |
| 100 long longMethodWithArgs(long longArg, DOMString strArg, TestObject objArg
); |
| 101 [MeasureAs=TestFeature] TestObject objMethod(); |
| 102 TestObject objMethodWithArgs(long longArg, DOMString strArg, TestObject objA
rg); |
| 103 |
| 104 void methodWithSequenceArg(sequence<TestInterface> sequenceArg); |
| 105 sequence<TestInterface> methodReturningSequence(long longArg); |
| 106 |
| 107 void methodWithEnumArg(TestEnumType enumArg); |
| 108 [RaisesException] TestObject methodThatRequiresAllArgsAndThrows(DOMString st
rArg, TestObject objArg); |
| 109 |
| 110 void methodQueryListListener(MediaQueryListListener listener); |
| 111 void serializedValue(SerializedScriptValue serializedArg); |
| 112 void optionsObject(Dictionary oo, optional Dictionary ooo); |
| 113 void optionsObjectList(sequence<Dictionary> list); |
| 114 |
| 115 // Indexed/named properties |
| 116 getter Node (unsigned long index); |
| 117 getter DOMString (DOMString name); |
| 118 |
| 119 // Exceptions |
| 120 [RaisesException] void methodWithException(); |
| 121 [RaisesException=Getter] attribute long attrWithGetterException; |
| 122 [RaisesException=Setter] attribute long attrWithSetterException; |
| 123 [RaisesException=Getter] attribute DOMString stringAttrWithGetterException; |
| 124 [RaisesException=Setter] attribute DOMString stringAttrWithSetterException; |
| 125 |
| 126 // 'Custom' extended attribute |
| 127 [Custom] attribute long customAttr; |
| 128 [Custom, MeasureAs=CustomTestFeature] void customMethod(); |
| 129 [Custom] void customMethodWithArgs(long longArg, DOMString strArg, TestObjec
t objArg); |
| 130 |
| 131 // 'CallWith' extended attribute |
| 132 [CallWith=ScriptState] void withScriptStateVoid(); |
| 133 [CallWith=ScriptState] TestObject withScriptStateObj(); |
| 134 [CallWith=ScriptState, RaisesException] void withScriptStateVoidException(); |
| 135 [CallWith=ScriptState, RaisesException] TestObject withScriptStateObjExcepti
on(); |
| 136 [CallWith=ExecutionContext] void withExecutionContext(); |
| 137 [CallWith=ExecutionContext&ScriptState] void withExecutionContextAndScriptSt
ate(); |
| 138 [CallWith=ExecutionContext&ScriptState, RaisesException] TestObject withExec
utionContextAndScriptStateObjException(); |
| 139 [CallWith= ExecutionContext & ScriptState ] TestObject withExecutionCont
extAndScriptStateWithSpaces(); |
| 140 [CallWith=ActiveWindow&FirstWindow] void withActiveWindowAndFirstWindow(); |
| 141 |
| 142 [CallWith=ExecutionContext] attribute TestObject withExecutionContextAttribu
te; |
| 143 [SetterCallWith=ActiveWindow&FirstWindow] attribute TestObject withActiveWin
dowAndFirstWindowAttribute; |
| 144 [RaisesException=Getter] attribute TestObject withScriptStateAttributeRaises
; |
| 145 |
| 146 // optional parameters |
| 147 void methodWithOptionalArg(optional long opt); |
| 148 void methodWithNonOptionalArgAndOptionalArg(long nonOpt, optional long op
t); |
| 149 void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional lon
g opt1, optional long opt2); |
| 150 void methodWithOptionalString(optional DOMString str); |
| 151 void methodWithOptionalStringIsUndefined([Default=Undefined] optional DOM
String str); |
| 152 void methodWithOptionalStringIsNullString([Default=NullString] optional D
OMString str); |
| 153 |
| 154 // Callback interface parameters |
| 155 void methodWithCallbackInterfaceArg(TestCallbackInterface callbackInterfa
ce); |
| 156 void methodWithNonCallbackArgAndCallbackInterfaceArg(long nonCallback, Te
stCallbackInterface callbackInterface); |
| 157 void methodWithCallbackInterfaceAndOptionalArg(optional TestCallbackInter
face callbackInterface); |
| 158 void methodWithNullableCallbackInterfaceArg(TestCallbackInterface? callba
ckInterface); |
| 159 // static methods with callback interface parameter |
| 160 static void staticMethodWithCallbackAndOptionalArg(optional TestCallbackI
nterface callbackInterface); |
| 161 static void staticMethodWithCallbackArg(TestCallbackInterface callbackInt
erface); |
| 162 |
| 163 // 'EnforceRange' extended attribute |
| 164 void methodWithEnforceRangeInt8([EnforceRange] byte value); |
| 165 void methodWithEnforceRangeUInt8([EnforceRange] octet value); |
| 166 void methodWithEnforceRangeInt16([EnforceRange] short value); |
| 167 void methodWithEnforceRangeUInt16([EnforceRange] unsigned short value); |
| 168 void methodWithEnforceRangeInt32([EnforceRange] long value); |
| 169 void methodWithEnforceRangeUInt32([EnforceRange] unsigned long value); |
| 170 void methodWithEnforceRangeInt64([EnforceRange] long long value); |
| 171 void methodWithEnforceRangeUInt64([EnforceRange] unsigned long long value
); |
| 172 |
| 173 [EnforceRange] attribute byte enforcedRangeByteAttr; |
| 174 [EnforceRange] attribute octet enforcedRangeOctetAttr; |
| 175 [EnforceRange] attribute short enforcedRangeShortAttr; |
| 176 [EnforceRange] attribute unsigned short enforcedRangeUnsignedShortAttr; |
| 177 [EnforceRange] attribute long enforcedRangeLongAttr; |
| 178 [EnforceRange] attribute unsigned long enforcedRangeUnsignedLongAttr; |
| 179 [EnforceRange] attribute long long enforcedRangeLongLongAttr; |
| 180 [EnforceRange] attribute unsigned long long enforcedRangeUnsignedLongLongAtt
r; |
| 181 |
| 182 // 'Conditional' extended attribute |
| 183 [Conditional=Condition1] attribute long conditionalAttr1; |
| 184 [Conditional=Condition1&Condition2] attribute long conditionalAttr2; |
| 185 [Conditional=Condition1|Condition2|Condition3] attribute long conditionalAtt
r3; |
| 186 |
| 187 // 'Conditional' extended method |
| 188 [Conditional=Condition1] DOMString conditionalMethod1(); |
| 189 [Conditional=Condition1&Condition2] void conditionalMethod2(); |
| 190 [Conditional=Condition1|Condition2] void conditionalMethod3(); |
| 191 |
| 192 [Conditional=Condition1] attribute TestObjectectAConstructor conditionalAttr
4; |
| 193 [Conditional=Condition1&Condition2] attribute TestObjectectBConstructor cond
itionalAttr5; |
| 194 [Conditional=Condition1|Condition2] attribute TestObjectectCConstructor cond
itionalAttr6; |
| 195 |
| 196 readonly attribute any cachedAttribute1; |
| 197 readonly attribute any cachedAttribute2; |
| 198 [CachedAttribute=isValueDirty] readonly attribute any cachedDirtyableAttribu
te; |
| 199 [RaisesException=Getter, CachedAttribute=isValueDirty] readonly attribute an
y cachedDirtyableAttributeRaises; |
| 200 |
107 attribute any anyAttribute; | 201 attribute any anyAttribute; |
108 // Custom type conversions | 202 |
109 attribute Promise promiseAttribute; | 203 attribute TestCallbackFunction callbackFunctionAttribute; |
110 attribute Window windowAttribute; | 204 TestCallbackFunction callbackFunctionReturnValue(); |
111 // DOM Node types | 205 void callbackFunctionArgument(TestCallbackFunction function); |
112 attribute Document documentAttribute; | 206 |
113 attribute DocumentFragment documentFragmentAttribute; | 207 // Overloads |
114 attribute DocumentType documentTypeAttribute; | 208 void overloadedMethod(long longArg); |
115 attribute Element elementAttribute; | 209 void overloadedMethod(TestCallbackInterface callbackInterfaceArg); |
116 attribute Node nodeAttribute; | 210 void overloadedMethod(TestObject objArg); |
117 attribute ShadowRoot shadowRootAttribute; | 211 void overloadedMethod(DOMString[] arrayArg); |
118 // Typed arrays | 212 void overloadedMethod(sequence<unsigned long> sequenceArg); |
119 attribute ArrayBuffer arrayBufferAttribute; | 213 void overloadedMethodA(TestObject? objArg, optional long longArg); |
120 attribute Float32Array float32ArrayAttribute; | 214 void overloadedMethodA(TestObject? objArg, DOMString strArg); |
121 attribute Uint8Array uint8ArrayAttribute; | 215 void overloadedMethodB(DOMString strArg); |
122 // Exceptions for is_keep_alive_for_gc | 216 void overloadedMethodB([StrictTypeChecking] DOMString strArg); |
123 readonly attribute TestInterfaceEmpty self; | 217 void overloadedMethodC(Dictionary dictionaryArg); // Non-wrapper type |
124 readonly attribute EventTarget readonlyEventTargetAttribute; | 218 void overloadedMethodC(double doubleArg); |
125 readonly attribute EventTarget? readonlyEventTargetOrNullAttribute; | 219 |
126 readonly attribute Window readonlyWindowAttribute; | 220 // Class methods within JavaScript (like what's used for IDBKeyRange). |
127 readonly attribute HTMLCollection htmlCollectionAttribute; | 221 static void classMethod(); |
128 readonly attribute HTMLElement htmlElementAttribute; | 222 static long classMethodWithOptional(optional long arg); |
129 // Arrays | 223 [Custom] static void classMethod2(long arg); |
130 attribute DOMString[] stringArrayAttribute; | 224 |
131 attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute; | 225 void classMethodWithClamp([Clamp] unsigned short objArgsShort, [Clamp] unsig
ned long objArgsLong); |
132 attribute float[] floatArrayAttribute; | 226 |
133 // Nullable attributes | 227 // [RuntimeEnabled] methods and attributes. |
134 attribute DOMString? stringOrNullAttribute; | 228 [RuntimeEnabled=FeatureName] void enabledAtRuntimeMethod(long longArg); |
135 attribute long? longOrNullAttribute; | 229 [RuntimeEnabled=FeatureName] attribute long enabledAtRuntimeAttr; |
136 attribute TestInterface? testInterfaceOrNullAttribute; | 230 // [PerContextEnabled] methods and attributes. |
137 // Enumerations | 231 [PerContextEnabled=FeatureName] void enabledPerContextMethod(long longArg); |
138 attribute TestEnum testEnumAttribute; | 232 [PerContextEnabled=FeatureName] attribute long enabledPerContextAttr; |
139 // Static attributes | 233 |
140 static attribute DOMString staticStringAttribute; | 234 attribute float[] floatArray; |
141 static attribute long staticLongAttribute; | 235 attribute double[] doubleArray; |
142 // Exceptional type | 236 attribute MessagePort[] messagePortArray; |
143 attribute EventHandler eventHandlerAttribute; | 237 |
144 | 238 void methodWithUnsignedLongSequence(sequence<unsigned long> unsignedLongSequ
ence); |
145 // Extended attributes | 239 [RaisesException] DOMString[] stringArrayFunction(DOMString[] values); |
146 [ActivityLogging=ForAllWorlds] attribute long activityLoggingAccessForAllWor
ldsLongAttribute; | 240 [RaisesException] DOMStringList domStringListFunction(DOMStringList values); |
147 [ActivityLogging=GetterForAllWorlds] attribute long activityLoggingGetterFor
AllWorldsLongAttribute; | 241 |
148 [ActivityLogging=SetterForAllWorlds] attribute long activityLoggingSetterFor
AllWorldsLongAttribute; | 242 [CheckSecurity=Node] readonly attribute Document contentDocument; |
149 [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute; | 243 |
150 [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribu
te; | 244 void convert1([TreatNullAs=NullString] TestNode value); |
151 [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonl
yDocumentAttribute; // All uses are read only | 245 void convert2([TreatNullAs=NullString, TreatUndefinedAs=NullString] TestNode
value); |
152 [Conditional=CONDITION] attribute long conditionalLongAttribute; | 246 |
153 [Conditional=CONDITION_1&CONDITION_2] attribute long conditionalAndLongAttri
bute; | 247 [ImplementedAs=banana] void orange(); |
154 [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttrib
ute; | 248 [ImplementedAs=blueberry] attribute long strawberry; |
155 // Constructors: FIXME: replace suffix with [ConstructorAttribute] | 249 |
156 attribute TestInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribu
te; | 250 [StrictTypeChecking] attribute float strictFloat; |
157 [DeprecateAs=deprecatedTestInterfaceEmptyConstructorAttribute] attribute Tes
tInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribute; | 251 [StrictTypeChecking, RaisesException] boolean strictFunction(DOMString str,
float a, long b); |
158 [MeasureAs=FeatureName] attribute TestInterfaceEmptyConstructor measureAsFea
tureNameTestInterfaceEmptyConstructorAttribute; | 252 |
159 [Custom] attribute object customObjectAttribute; | 253 [Replaceable] readonly attribute long replaceableAttribute; |
160 [Custom=Getter] attribute long customGetterLongAttribute; | 254 |
161 [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribut
e; | 255 void variadicStringMethod(DOMString head, DOMString... tail); |
162 [Custom=Setter] attribute long customSetterLongAttribute; | 256 void variadicDoubleMethod(double head, double... tail); |
163 [Conditional=CONDITION, Custom] attribute long customLongAttribute; | 257 void variadicNodeMethod(Node head, Node... tail); |
164 [CustomElementCallbacks] readonly attribute long customElementsCallbacksRead
onlyLongAttribute; | 258 |
165 [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute; | 259 // Nullable attributes. |
166 [EnforceRange] attribute long enforceRangeLongAttribute; | 260 readonly attribute double? nullableDoubleAttribute; |
167 [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute; | 261 readonly attribute long? nullableLongAttribute; |
168 [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute; | 262 readonly attribute boolean? nullableBooleanAttribute; |
169 [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImp
lementedAsLongAttribute; | 263 readonly attribute DOMString? nullableStringAttribute; |
170 [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customGetterImplementedAsLongAttribute; | 264 attribute long? nullableLongSettableAttribute; |
171 [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute l
ong customSetterImplementedAsLongAttribute; | 265 |
172 [MeasureAs=TestFeature] attribute long measureAsLongAttribute; | 266 [PerWorldBindings] readonly attribute TestObject perWorldReadOnlyAttribute; |
173 [NotEnumerable] attribute long notEnumerableLongAttribute; | 267 [PerWorldBindings] attribute TestObject perWorldAttribute; |
174 [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribut
e; | 268 [PerWorldBindings] void perWorldMethod(); |
175 [PerWorldBindings] attribute long perWorldBindingsLongAttribute; | 269 [PerWorldBindings] void overloadedPerWorldMethod(long longArg); |
176 [PerWorldBindings] readonly attribute long perWorldBindingsReadonlyLongAttri
bute; // Separate read only attribute to check attribute configuration | 270 [PerWorldBindings] void overloadedPerWorldMethod(DOMString strArg, long long
Arg); |
177 [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsRea
donlyTestInterfaceEmptyAttribute; | 271 |
178 [ActivityLogging=ForAllWorlds, PerWorldBindings] attribute long activityLogg
ingAccessPerWorldBindingsLongAttribute; | 272 [ActivityLogging=ForAllWorlds] void activityLoggedMethod1(long longArg); |
179 [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] attribute long activit
yLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute; | 273 [PerWorldBindings, ActivityLogging=ForAllWorlds] void activityLoggedMethod2(
long longArg); |
180 [ActivityLogging=GetterForAllWorlds, PerWorldBindings] attribute long activi
tyLoggingGetterPerWorldBindingsLongAttribute; | 274 [PerWorldBindings, ActivityLogging=ForIsolatedWorlds] void activityLoggedInI
solatedWorldMethod(long longArg); |
181 [ActivityLogging=GetterForIsolatedWorlds, PerWorldBindings] attribute long a
ctivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute; | 275 [PerWorldBindings, ActivityLogging=ForAllWorlds] void overloadedActivityLogg
edMethod(long longArg); |
| 276 [PerWorldBindings, ActivityLogging=ForAllWorlds] void overloadedActivityLogg
edMethod(DOMString strArg, long longArg); |
| 277 [ActivityLogging=ForAllWorlds] attribute long activityLoggedAttr1; |
| 278 [PerWorldBindings, ActivityLogging=ForAllWorlds] attribute long activityLogg
edAttr2; |
| 279 [PerWorldBindings, ActivityLogging=ForIsolatedWorlds] attribute long activit
yLoggedInIsolatedWorldsAttr; |
| 280 [ActivityLogging=SetterForAllWorlds] attribute long activityLoggedAttrSetter
1; |
| 281 [PerWorldBindings, ActivityLogging=SetterForAllWorlds] attribute long activi
tyLoggedAttrSetter2; |
| 282 [PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute long a
ctivityLoggedInIsolatedWorldsAttrSetter; |
| 283 [ActivityLogging=GetterForAllWorlds] attribute long activityLoggedAttrGetter
1; |
| 284 [PerWorldBindings, ActivityLogging=GetterForAllWorlds] attribute long activi
tyLoggedAttrGetter2; |
| 285 [PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds] attribute long a
ctivityLoggedInIsolatedWorldsAttrGetter; |
| 286 |
| 287 // DeprecateAs |
| 288 [DeprecateAs=StaticReadonlyAttribute] static readonly attribute long depreca
tedStaticReadOnlyAttr; |
| 289 [DeprecateAs=StaticAttribute] static attribute long deprecatedStaticAttr; |
| 290 [DeprecateAs=ReadonlyAttribute] readonly attribute long deprecatedReadonlyAt
tr; |
| 291 [DeprecateAs=Attribute] attribute long deprecatedAttr; |
| 292 |
| 293 [DeprecateAs=Method] void deprecatedMethod(); |
| 294 [DeprecateAs=StaticMethod] static void deprecatedStaticMethod(); |
| 295 [DeprecateAs=ConstructorAttribute] attribute TestSubObjConstructor deprecate
dConstructor; |
| 296 |
| 297 [DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1; |
| 298 |
| 299 // PutForwards |
182 [PutForwards=href] readonly attribute TestNode location; | 300 [PutForwards=href] readonly attribute TestNode location; |
183 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; | 301 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; |
184 [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith; | |
185 [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWit
hPerWorldBindings; | |
186 [PutForwards=attr1] readonly attribute TestInterfaceWillBeGarbageCollected l
ocationWillBeGarbageCollected; | |
187 [RaisesException] attribute long raisesExceptionLongAttribute; | |
188 [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute; | |
189 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; | |
190 [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceE
mptyAttribute; | |
191 [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttribut
eRaisesExceptionGetterAnyAttribute; | |
192 [Reflect] attribute TestInterface reflectTestInterfaceAttribute; | |
193 [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNam
eAttributeTestAttribute; | |
194 // [Reflect] exceptional types: exceptional getters, exceptional setters, | |
195 // or range checking for unsigned | |
196 [Reflect] attribute boolean reflectBooleanAttribute; | |
197 [Reflect] attribute long reflectLongAttribute; | |
198 [Reflect] attribute unsigned short reflectUnsignedShortAttribute; | |
199 [Reflect] attribute unsigned long reflectUnsignedLongAttribute; | |
200 // [Reflect] exceptional names | |
201 [Reflect] attribute DOMString id; | |
202 [Reflect] attribute DOMString name; | |
203 [Reflect] attribute DOMString class; | |
204 [Reflect=id] attribute DOMString reflectedId; | |
205 [Reflect=name] attribute DOMString reflectedName; | |
206 [Reflect=class] attribute DOMString reflectedClass; | |
207 // Limited value attributes and enumerated attributes | |
208 [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribut
e; | |
209 [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnl
yAttribute; | |
210 [Reflect=other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedT
oOnlyOtherAttribute; | |
211 [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString
limitedWithMissingDefaultAttribute; | |
212 [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInva
lid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute; | |
213 [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous
", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute
; | |
214 [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="
empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute D
OMString limitedWithEmptyMissingInvalidAttribute; | |
215 | |
216 [Replaceable] readonly attribute long replaceableReadonlyLongAttribute; | |
217 [Replaceable, PutForwards=href] readonly attribute TestNode locationReplacea
ble; | |
218 [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute; | |
219 [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long p
erContextEnabledRuntimeEnabledLongAttribute; | |
220 [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long condition
alRuntimeEnabledLongAttribute; | |
221 [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString setterCallWith
ActiveWindowAndFirstWindowStringAttribute; | |
222 [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutio
nContextStringAttribute; | |
223 [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // no
p for non-interface types | |
224 [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterface
Attribute; | |
225 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; | |
226 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; | |
227 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; | |
228 [Reflect, URL] attribute DOMString urlStringAttribute; | |
229 [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute; | |
230 [Unforgeable] attribute long unforgeableLongAttribute; | |
231 | |
232 | |
233 // Methods | |
234 // | |
235 // Naming convention: | |
236 // ReturnType returnTypeMethodTypeName1ArgTypeName2Arg(Type1 typeName1Arg, T
ype2 typeName2Arg); | |
237 // E.g., | |
238 // void voidMethodStringArgLongArrayArg(DOMString stringArg, long[] longArra
yArg); | |
239 void voidMethod(); | |
240 static void staticVoidMethod(); | |
241 | |
242 // Types | |
243 // Basic types | |
244 Date dateMethod(); | |
245 DOMString stringMethod(); | |
246 DOMTimeStamp readonlyDOMTimeStampMethod(); | |
247 boolean booleanMethod(); | |
248 byte byteMethod(); | |
249 double doubleMethod(); | |
250 float floatMethod(); | |
251 long longMethod(); | |
252 long long longLongMethod(); | |
253 octet octetMethod(); | |
254 short shortMethod(); | |
255 unsigned long unsignedLongMethod(); | |
256 unsigned long long unsignedLongLongMethod(); | |
257 unsigned short unsignedShortMethod(); | |
258 | |
259 void voidMethodDateArg(Date dateArg); | |
260 void voidMethodStringArg(DOMString stringArg); | |
261 void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); | |
262 void voidMethodBooleanArg(boolean booleanArg); | |
263 void voidMethodByteArg(byte byteArg); | |
264 void voidMethodDoubleArg(double doubleArg); | |
265 void voidMethodFloatArg(float floatArg); | |
266 void voidMethodLongArg(long longArg); | |
267 void voidMethodLongLongArg(long long longLongArg); | |
268 void voidMethodOctetArg(octet octetArg); | |
269 void voidMethodShortArg(short shortArg); | |
270 void voidMethodUnsignedLongArg(unsigned long unsignedLongArg); | |
271 void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg); | |
272 void voidMethodUnsignedShortArg(unsigned short unsignedShortArg); | |
273 // Interface types | |
274 TestInterfaceEmpty testInterfaceEmptyMethod(); | |
275 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | |
276 void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty
testInterfaceEmptyArg); | |
277 // Callback function type | |
278 VoidCallbackFunction voidCallbackFunctionMethod(); | |
279 AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod(); | |
280 void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunc
tionArg); | |
281 void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptional
AnyArg anyCallbackFunctionOptionalAnyArgArg); | |
282 // Custom type conversions | |
283 CompareHow compareHowMethod(); | |
284 any anyMethod(); | |
285 void voidMethodCompareHowArg(CompareHow compareHowArg); | |
286 void voidMethodEventTargetArg(EventTarget eventTargetArg); | |
287 void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryLi
stListenerArg); | |
288 void voidMethodAnyArg(any anyArg); | |
289 // DOM node types | |
290 void voidMethodAttrArg(Attr attrArg); | |
291 void voidMethodDocumentArg(Document documentArg); | |
292 void voidMethodDocumentTypeArg(DocumentType documentTypeArg); | |
293 void voidMethodElementArg(Element elementArg); | |
294 void voidMethodNodeArg(Node nodeArg); | |
295 // Typed arrays | |
296 ArrayBuffer arrayBufferMethod(); | |
297 ArrayBufferView arrayBufferViewMethod(); | |
298 Float32Array float32ArrayMethod(); | |
299 Int32Array int32ArrayMethod(); | |
300 Uint8Array uint8ArrayMethod(); | |
301 void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg); | |
302 void voidMethodArrayBufferOrNullArg(ArrayBuffer? arrayBufferArg); | |
303 void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg); | |
304 void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg); | |
305 void voidMethodInt32ArrayArg(Int32Array int32ArrayArg); | |
306 void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg); | |
307 // Arrays | |
308 long[] longArrayMethod(); | |
309 DOMString[] stringArrayMethod(); | |
310 TestInterfaceEmpty[] testInterfaceEmptyArrayMethod(); | |
311 void voidMethodArrayLongArg(long[] arrayLongArg); | |
312 void voidMethodArrayStringArg(DOMString[] arrayStringArg); | |
313 void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInte
rfaceEmptyArg); | |
314 // Sequences | |
315 sequence<long> longSequenceMethod(); | |
316 sequence<DOMString> stringSequenceMethod(); | |
317 sequence<TestInterfaceEmpty> testInterfaceEmptySequenceMethod(); | |
318 void voidMethodSequenceLongArg(sequence<long> longSequenceArg); | |
319 void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg); | |
320 void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> te
stInterfaceEmptySequenceArg); | |
321 // Nullable types | |
322 // Currently only used on interface type arguments | |
323 void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestI
nterfaceEmptyArg); | |
324 // Callback interface types | |
325 void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackIn
terfaceArg); | |
326 void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterfa
ce optionalTestCallbackInterfaceArg); | |
327 void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCal
lbackInterfaceArg); | |
328 // Enumerations | |
329 TestEnum testEnumMethod(); | |
330 void voidMethodTestEnumArg(TestEnum testEnumTypeArg); | |
331 // Exceptional types | |
332 Dictionary dictionaryMethod(); | |
333 NodeFilter nodeFilterMethod(); | |
334 Promise promiseMethod(); | |
335 SerializedScriptValue serializedScriptValueMethod(); | |
336 XPathNSResolver xPathNSResolverMethod(); | |
337 void voidMethodDictionaryArg(Dictionary dictionaryArg); | |
338 void voidMethodEventListenerArg(EventListener eventListenerArg); | |
339 void voidMethodNodeFilterArg(NodeFilter nodeFilterArg); | |
340 void voidMethodPromiseArg(Promise promiseArg); | |
341 void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScri
ptValueArg); | |
342 void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg); | |
343 void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequence
Arg); | |
344 | |
345 // Arguments | |
346 void voidMethodStringArgLongArg(DOMString stringArg, long longArg); | |
347 // Optional arguments | |
348 void voidMethodOptionalStringArg(optional DOMString optionalStringArg); | |
349 void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty opt
ionalTestInterfaceEmptyArg); | |
350 void voidMethodOptionalLongArg(optional long optionalLongArg); | |
351 DOMString stringMethodOptionalLongArg(optional long optionalLongArg); | |
352 TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long opt
ionalLongArg); | |
353 long longMethodOptionalLongArg(optional long optionalLongArg); | |
354 void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLo
ngArg); | |
355 void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional
long optionalLongArg1, optional long optionalLongArg2); | |
356 void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional T
estInterfaceEmpty optionalTestInterfaceEmpty); | |
357 void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optio
nalTestInterfaceEmpty, optional long longArg); | |
358 // Optional arguments: exceptional case | |
359 void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryA
rg); | |
360 | |
361 // Variadic operations | |
362 void voidMethodVariadicStringArg(DOMString... variadicStringArgs); | |
363 void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString...
variadicStringArgs); | |
364 void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicT
estInterfaceEmptyArgs); | |
365 void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterf
aceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmpty
Args); | |
366 // [WillBeGarbageCollected] | |
367 void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceW
illBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg); | |
368 | |
369 // Overloaded methods | |
370 void overloadedMethodA(long longArg); | |
371 void overloadedMethodA(long longArg1, long longArg2); | |
372 void overloadedMethodB(long longArg); | |
373 void overloadedMethodB(long longArg1, optional long longArg2); | |
374 void overloadedMethodC(long longArg); | |
375 void overloadedMethodC(long longArg, long... longArgs); | |
376 void overloadedMethodD(long longArg); | |
377 void overloadedMethodD(TestInterfaceEmpty testInterfaceEmptyArg); | |
378 void overloadedMethodE(long longArg); | |
379 void overloadedMethodE(long[] longArrayArg); | |
380 void overloadedMethodF(long longArg); | |
381 void overloadedMethodF(TestInterfaceEmpty? testInterfaceEmptyNullableArg); | |
382 void overloadedMethodG(); | |
383 void overloadedMethodG([StrictTypeChecking] DOMString strictTypeCheckingStri
ngArg); | |
384 void overloadedMethodH(); | |
385 void overloadedMethodH(TestCallbackInterface testCallbackInterfaceArg); | |
386 // FIXME: Should be in order double, Dictionary, but Blink implementation of | |
387 // overload resolution can't handle this. http://crbug.com/293561 | |
388 void overloadedMethodI(Dictionary dictionaryArg); // Non-wrapper type | |
389 void overloadedMethodI(double doubleArg); | |
390 | |
391 | |
392 [PerWorldBindings] void overloadedPerWorldBindingsMethod(); | |
393 [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); | |
394 | |
395 static void overloadedStaticMethod(long longArg); | |
396 static void overloadedStaticMethod(long longArg1, long longArg2); | |
397 | |
398 // Extended attributes for arguments | |
399 // [Clamp] | |
400 void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedSho
rtArg); | |
401 void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongA
rg); | |
402 // [Default] | |
403 void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] opt
ional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); | |
404 void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long def
aultUndefinedLongArg); | |
405 void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMStr
ing defaultUndefinedStringArg); | |
406 void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMS
tring defaultNullStringStringArg); | |
407 // [EnforceRange] | |
408 void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); | |
409 // [TreatNullAs], [TreatUndefinedAs] | |
410 void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMSt
ring treatNullAsNullStringStringArg); | |
411 void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([Tre
atNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStrin
gStringArg); | |
412 | |
413 // Extended attributes for methods | |
414 [ActivityLogging=ForAllWorlds] void activityLoggingAccessForAllWorldsMethod(
); | |
415 [CallWith=ScriptState] void callWithScriptStateVoidMethod(); | |
416 [CallWith=ScriptState] long callWithScriptStateLongMethod(); | |
417 [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod(); | |
418 [CallWith=ScriptState&ExecutionContext] void callWithScriptStateExecutionCon
textVoidMethod(); | |
419 [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumen
tsVoidMethod(); | |
420 [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumen
tsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg); | |
421 [CallWith=ActiveWindow] void callWithActiveWindow(); | |
422 [CallWith=ActiveWindow&FirstWindow] void callWithActiveWindowScriptWindow(); | |
423 [CheckSecurity=Node] void checkSecurityForNodeVoidMethod(); | |
424 [Conditional=CONDITION] void conditionalConditionVoidMethod(); | |
425 [Conditional=CONDITION_1&CONDITION_2] void conditionalCondition1AndCondition
2VoidMethod(); | |
426 [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod(); | |
427 [Custom] void customVoidMethod(); | |
428 [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod(); | |
429 [CustomElementCallbacks] void customElementCallbacksVoidMethod(); | |
430 [DeprecateAs=voidMethod] void deprecatedVoidMethod(); | |
431 [DoNotCheckSignature] void doNotCheckSignatureVoidMethod(); | |
432 [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod(); | |
433 [MeasureAs=TestFeature] void measureAsVoidMethod(); | |
434 [NotEnumerable] void notEnumerableVoidMethod(); | |
435 [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod(); | |
436 [PerWorldBindings] void perWorldBindingsVoidMethod(); | |
437 [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(Test
InterfaceEmpty testInterfaceEmptyArg); | |
438 [ActivityLogging=ForAllWorlds, PerWorldBindings] void activityLoggingForAllW
orldsPerWorldBindingsVoidMethod(); | |
439 [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] void activityLoggingFo
rIsolatedWorldsPerWorldBindingsVoidMethod(); | |
440 [RaisesException] void raisesExceptionVoidMethod(); | |
441 [RaisesException] DOMString raisesExceptionStringMethod(); | |
442 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); | |
443 [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(Tes
tCallbackInterface testCallbackInterfaceArg); | |
444 [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfac
eArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg); | |
445 [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMe
thod(); | |
446 [CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRa
isesExceptionVoidMethodLongArg(long longArg); | |
447 [ReadOnly] void readOnlyVoidMethod(); | |
448 [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod(); | |
449 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); | |
450 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); | |
451 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyArg(
TestInterfaceEmpty testInterfaceEmptyArg); | |
452 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNu
llArg(TestInterfaceEmpty? testInterfaceEmptyArg); | |
453 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); | |
454 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); | |
455 [Unforgeable] void unforgeableVoidMethod(); | |
456 // [WillBeGarbageCollected] | |
457 void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestI
nterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg); | |
458 void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWill
BeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg); | |
459 | |
460 // Extended attributes on referenced interfaces | |
461 // (not self; self-reference tests at interface themselves) | |
462 attribute TestInterface testInterfaceAttribute; // [ImplementedAs] | |
463 attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageColl
ectedAttribute; // [WillBeGarbageCollected] | |
464 attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCol
lectedOrNullAttribute; // [WillBeGarbageCollected] | |
465 }; | 302 }; |
| 303 |
| 304 // The following comment should not generate any code |
| 305 // TestObject implements TestImplements; |
| 306 |
OLD | NEW |