Changeset 15463 in webkit for trunk/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jul 15, 2006, 6:40:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.h
r15462 r15463 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. 401 @param parameterCount An integer count of the number of parameter names in parameterNames. 402 @param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. 400 403 @param body A JSString containing the script to use as the function's body. 401 404 @param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. 402 405 @param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. 403 406 @param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. 404 @result A JSObject that is a n anonymous function, or NULL if body contains a syntax error. The returnedobject's prototype will be the default function prototype.407 @result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype. 405 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. 406 409 */ 407 JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);410 JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); 408 411 409 412 /*! … … 521 524 @param thisObject The object to use as "this," or NULL to use the global object as "this." 522 525 @param argumentCount An integer count of the number of arguments in arguments. 523 @param arguments A JSValue array of the arguments to pass to the function. 526 @param arguments A JSValue array of the arguments to pass to the function. Pass NULL if argumentCount is 0. 524 527 @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. 525 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. … … 539 542 @param object The JSObject to call as a constructor. 540 543 @param argumentCount An integer count of the number of arguments in arguments. 541 @param arguments A JSValue array of the arguments to pass to the function. 544 @param arguments A JSValue array of the arguments to pass to the function. Pass NULL if argumentCount is 0. 542 545 @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. 543 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.
Note:
See TracChangeset
for help on using the changeset viewer.