Changes between Version 116 and Version 117 of WebKitIDL
- Timestamp:
- May 17, 2013, 2:41:50 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v116 v117 25 25 - [#ConstructorTemplate ConstructorTemplate(i), InitializedByEventConstructor(a)][[br]] 26 26 - [#NamedConstructor NamedConstructor(i)][[br]] 27 - [#CustomConstructor CustomConstructor(i) , ConstructorParameters(i)][[br]]27 - [#CustomConstructor CustomConstructor(i)[[br]] 28 28 - [#Conditional Conditional(i,m,a)][[br]] 29 29 - [#CheckSecurity CheckSecurity(i), DoNotCheckSecurity(m,a), DoNotCheckSecurityOnGetter(a), DoNotCheckSecurityOnSetter(a)][[br]] … … 775 775 Whether you should allow an interface to have a named constructor or not depends on the spec of each interface. 776 776 777 == `[CustomConstructor]`(i), `[ConstructorParameters]`(i) == #CustomConstructor 778 779 Summary: They allow you to write custom bindings for constructors. 780 781 Usage: They can be specified on interfaces. 782 Regarding `[ConstructorParameters]`, the possible usage is `[ConstructorParameters=X]`, where `X` is the number of mandatory arguments of the constructor: 777 == `[CustomConstructor]`(i) == #CustomConstructor 778 779 Summary: It allows you to write custom bindings for constructors. 780 781 Usage: It can be specified on interfaces. 783 782 {{{ 784 783 [ 785 784 CustomConstructor, 786 ConstructorParameters=4 787 ] interface XXX { 788 }; 789 }}} 785 ] interface XXX { 786 }; 787 788 [ 789 CustomConstructor(DOMString str, optional boolean flag), 790 ] interface YYY { 791 }; 792 }}} 793 794 The constructor arguments should be specified so that the bindings generator can properly compute the value for the "length" property of the constructor object. 790 795 791 796 We should minimize the number of custom bindings as less as possible. … … 804 809 [ 805 810 CustomConstructor, 806 ConstructorParameters=2807 811 ] interface XXX { 808 812 }; … … 816 820 }}} 817 821 Refer to WebCore/bindings/js/JSXXXCustom.cpp for more details. 818 819 `X` of `[ConstructorParameters=X]` is the number of mandatory arguments.820 For example, if a constructor signature is `[Constructor(int a, int b, [Default=Undefined] optional int c, [Default=DefaultIsUndefined] optional int d)]`, then `X` is 2.821 822 You do not need to specify `[ConstructorParameters]` if the interface does not have `[CustomConstructor]` extended attribute.823 822 824 823 == `[Conditional]`(i,m,a) == #Conditional