/*!
@function
-@abstract Evaluates a string of JavaScript.
-@param ctx The execution context to use.
-@param script A JSString containing the script to evaluate.
-@param thisObject The object to use as "this," or NULL to use the global object as "this."
-@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.
+@abstract Evaluates a string of JavaScript.
+@param ctx The execution context to use.
+@param script A JSString containing the script to evaluate.
+@param thisObject The object to use as "this," or NULL to use the global object as "this."
+@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.
@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.
-@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.
-@result The JSValue that results from evaluating script, or NULL if an exception is thrown.
+@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.
+@result The JSValue that results from evaluating script, or NULL if an exception is thrown.
*/
JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
/*!
@function JSCheckScriptSyntax
-@abstract Checks for syntax errors in a string of JavaScript.
-@param ctx The execution context to use.
-@param script A JSString containing the script to check for syntax errors.
-@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.
+@abstract Checks for syntax errors in a string of JavaScript.
+@param ctx The execution context to use.
+@param script A JSString containing the script to check for syntax errors.
+@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.
@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.
-@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.
-@result true if the script is syntactically correct, otherwise false.
+@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.
+@result true if the script is syntactically correct, otherwise false.
*/
bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
@abstract Gets a property from an object by numeric index.
@param ctx The execution context to use.
@param object The JSObject whose property you want to get.
-@param propertyIndex The property's name as a number
+@param propertyIndex The property's name as a number.
@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.
@result The property's value if object has the property, otherwise the undefined value.
@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but it enables optimized access to JavaScript arrays.
@abstract Sets a property on an object by numeric index.
@param ctx The execution context to use.
@param object The JSObject whose property you want to set.
-@param propertyIndex The property's name as a number
+@param propertyIndex The property's name as a number.
@param value A JSValue to use as the property's value.
@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.
@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but it enables optimized access to JavaScript arrays.
/*!
@function
-@abstract Retains a JavaScript property name array.
-@param array The JSPropertyNameArray to retain.
-@result A JSPropertyNameArray that is the same as array.
+@abstract Retains a JavaScript property name array.
+@param array The JSPropertyNameArray to retain.
+@result A JSPropertyNameArray that is the same as array.
*/
JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array);
/*!
@function
-@abstract Releases a JavaScript property name array.
-@param array The JSPropetyNameArray to release.
+@abstract Releases a JavaScript property name array.
+@param array The JSPropetyNameArray to release.
*/
void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
/*!
@function
-@abstract Get the number of items in a JavaScript property name array.
-@param array The array from which to retrieve the count.
-@result The count of items in the array.
+@abstract Get the number of items in a JavaScript property name array.
+@param array The array from which to retrieve the count.
+@result The count of items in the array.
*/
size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
/*!
@function
-@abstract Get a single item from a JavaScript property name array.
-@param array The array from which to retrieve a property name.
-@param index The index of the property name to retrieve.
-@result A JSStringRef containing the name of the property.
+@abstract Get a single item from a JavaScript property name array.
+@param array The array from which to retrieve a property name.
+@param index The index of the property name to retrieve.
+@result A JSStringRef containing the name of the property.
*/
JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index);
/*!
@function
-@abstract Add a property name - useful while getting the property names for an object.
-@param accumulator The accumulator object to which to add the property.
+@abstract Add a property name - useful while getting the property names for an object.
+@param accumulator The accumulator object to which to add the property.
@param propertyName The new property to add.
*/
void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName);