Changes between Version 27 and Version 28 of WebKitIDL
- Timestamp:
- Feb 14, 2012, 1:03:18 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v27 v28 156 156 You need to prepare WebCore/bindings/js/JSXXXCustom.cpp and write custom bindings, like this: 157 157 {{{ 158 EncodedJSValue JSC_HOST_CALL jsXXXPrototypeFunctionCustomMethod(ExecState* exec)158 JSValue JSXXX::func(ExecState* exec) 159 159 { 160 160 ...; 161 161 } 162 162 }}} 163 Please refer to WebCore/bindings/js/JSXXXCustom.cpp for more details.163 Refer to WebCore/bindings/js/JSXXXCustom.cpp for more details. 164 164 165 165 * JavaScriptCore attribute getter … … 172 172 You need to prepare WebCore/bindings/js/JSXXXCustom.cpp and write custom bindings, like this: 173 173 {{{ 174 JSValue jsXXXCustomAttr(ExecState* exec, JSValue slotBase, const Identifier&)174 JSValue JSXXX::str(ExecState* exec) const 175 175 { 176 176 ...; 177 177 } 178 178 }}} 179 Please refer to WebCore/bindings/js/JSXXXCustom.cpp for more details.179 Refer to WebCore/bindings/js/JSXXXCustom.cpp for more details. 180 180 181 181 * JavaScriptCore attribute setter … … 188 188 You need to prepare WebCore/bindings/js/JSXXXCustom.cpp and write custom bindings, like this: 189 189 {{{ 190 void setJSXXXCustomAttr(ExecState* exec, JSObject* thisObject, JSValue value)190 void JSXXX::setStr(ExecState*, JSValue value) 191 191 { 192 192 ...; 193 193 } 194 194 }}} 195 Please refer to WebCore/bindings/js/JSXXXCustom.cpp for more details.195 Refer to WebCore/bindings/js/JSXXXCustom.cpp for more details. 196 196 197 197 * V8 method … … 209 209 } 210 210 }}} 211 Please refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details.211 Refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details. 212 212 213 213 * V8 attribute getter … … 220 220 You need to prepare WebCore/bindings/v8/custom/V8XXXCustom.cpp and write custom bindings in the following signature: 221 221 {{{ 222 222 v8::Handle<v8::Value> V8XXX::strAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 223 223 { 224 224 ...; 225 225 } 226 226 }}} 227 Please refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details.227 Refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details. 228 228 229 229 * V8 attribute setter … … 231 231 {{{ 232 232 interface XXX { 233 [V8Custom] void func(in int a, in int b);233 attribute [V8CustomSetter] DOMString str; 234 234 } 235 235 }}} 236 236 You need to prepare WebCore/bindings/v8/custom/V8XXXCustom.cpp and write custom bindings in the following signature: 237 237 {{{ 238 v 8::Handle<v8::Value> V8XXX::funcCallback(const v8::Arguments& args)238 void V8XXX::eventAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 239 239 { 240 240 ...; 241 241 } 242 242 }}} 243 Please refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details.243 Refer to WebCore/bindings/v8/custom/V8XXXCustom.cpp for more details. 244 244 245 245 We should minimize the number of custom bindings as less as possible. Before using [Custom], you should doubly consider if you really need custom bindings.