Changeset 15464 in webkit for trunk/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jul 15, 2006, 7:18:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.h
r15463 r15464 182 182 @discussion If you named your function CallAsFunction, you would declare it like this: 183 183 184 JSValueRef CallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);184 JSValueRef CallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 185 185 186 186 If your callback were invoked by the JavaScript expression 'myObject.myMemberFunction()', function would be set to myMemberFunction, and thisObject would be set to myObject. … … 189 189 */ 190 190 typedef JSValueRef 191 (*JSObjectCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);191 (*JSObjectCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 192 192 193 193 /*! … … 202 202 @discussion If you named your function CallAsConstructor, you would declare it like this: 203 203 204 JSObjectRef CallAsConstructor(JSContextRef context, JSObjectRef constructor, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);204 JSObjectRef CallAsConstructor(JSContextRef context, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 205 205 206 206 If your callback were invoked by the JavaScript expression 'new myConstructorFunction()', constructor would be set to myConstructorFunction. … … 209 209 */ 210 210 typedef JSObjectRef 211 (*JSObjectCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);211 (*JSObjectCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 212 212 213 213 /*! … … 398 398 @abstract Creates a function with a given script as its body. 399 399 @param context The execution context to use. 400 @param A JSString containting the function's name. Pass NULL to create an anonymous function.400 @param name A JSString containing the function's name. Pass NULL to create an anonymous function. 401 401 @param parameterCount An integer count of the number of parameter names in parameterNames. 402 402 @param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. … … 408 408 @discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. 409 409 */ 410 JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);410 JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); 411 411 412 412 /*! … … 528 528 @result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function. 529 529 */ 530 JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);530 JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 531 531 /*! 532 532 @function … … 546 546 @result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor. 547 547 */ 548 JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);548 JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 549 549 550 550 /*!
Note:
See TracChangeset
for help on using the changeset viewer.