Ignore:
Timestamp:
Jul 12, 2006, 1:12:08 AM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Implemented a vast number of renames and comment clarifications suggested during API review.


JSInternalString -> JSString
JS*Make -> JSValueMake*, JSObjectMake*
JSTypeCode -> JSType
JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
JSGC*Protect -> JSValue*Protect
JS*Callback -> JSObject*Callback
JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
JSString* ->

JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString,
JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.


  • Changed functions taking a JSValue out arg and returning a bool indicating whether it was set to simply return a JSValue or NULL.


  • Removed JSStringGetCharacters because it's more documentation than code, and it's just a glorified memcpy built on existing API functionality.


  • Moved standard library includes into the headers that actually require them.


  • Standardized use of the phrase "Create Rule."


  • Removed JSLock from make functions that don't allocate.


  • Added exception handling to JSValueToBoolean, since we now allow callback objects to throw exceptions upon converting to boolean.


  • Renamed JSGCCollect to JSGarbageCollect.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSObjectRef.h

    r15328 r15376  
    3131#include <JavaScriptCore/JSValueRef.h>
    3232
     33#include <stdbool.h>
     34#include <stddef.h> // for size_t
     35
    3336#ifdef __cplusplus
    3437extern "C" {
     
    5659
    5760/*!
    58 @typedef JSInitializeCallback
     61@typedef JSObjectInitializeCallback
    5962@abstract The callback invoked when an object is first created.
    6063@param context The execution context to use.
     
    6669*/
    6770typedef void
    68 (*JSInitializeCallback) (JSContextRef context, JSObjectRef object, JSValueRef* exception);
    69 
    70 /*!
    71 @typedef JSFinalizeCallback
     71(*JSObjectInitializeCallback) (JSContextRef context, JSObjectRef object, JSValueRef* exception);
     72
     73/*!
     74@typedef JSObjectFinalizeCallback
    7275@abstract The callback invoked when an object is finalized (prepared for garbage collection).
    7376@param object The JSObject being finalized.
     
    7780*/
    7881typedef void           
    79 (*JSFinalizeCallback) (JSObjectRef object);
    80 
    81 /*!
    82 @typedef JSHasPropertyCallback
     82(*JSObjectFinalizeCallback) (JSObjectRef object);
     83
     84/*!
     85@typedef JSObjectHasPropertyCallback
    8386@abstract The callback invoked when determining whether an object has a given property.
    8487@param context The current execution context.
    8588@param object The JSObject to search for the property.
    86 @param propertyName A JSInternalString containing the name of the property look up.
     89@param propertyName A JSString containing the name of the property look up.
    8790@param exception A pointer to a JSValueRef in which to return an exception, if any.
    8891@result true if object has the property, otherwise false.
    8992@discussion If you named your function HasProperty, you would declare it like this:
    9093
    91 bool HasProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* exception);
    92 
    93 This callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive. If this callback is NULL, the getProperty callback will be used to service hasProperty calls.
     94bool HasProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     95
     96If this function returns false, the hasProperty request forwards to object's static property table, then its parent class chain (which includes the default object class), then its prototype chain.
     97
     98This callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive. If this callback is NULL, the getProperty callback will be used to service hasProperty requests.
    9499*/
    95100typedef bool
    96 (*JSHasPropertyCallback) (JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* exception);
    97 
    98 /*!
    99 @typedef JSGetPropertyCallback
     101(*JSObjectHasPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     102
     103/*!
     104@typedef JSObjectGetPropertyCallback
    100105@abstract The callback invoked when getting a property from an object.
    101106@param context The current execution context.
    102107@param object The JSObject to search for the property.
    103 @param propertyName A JSInternalString containing the name of the property to get.
    104 @param returnValue A pointer to a JSValue in which to store the property's value.
    105 @param exception A pointer to a JSValueRef in which to return an exception, if any.
    106 @result true if object has the property in question, otherwise false. If this function returns true, returnValue is assumed to contain a valid JSValue.
     108@param propertyName A JSString containing the name of the property to get.
     109@param exception A pointer to a JSValueRef in which to return an exception, if any.
     110@result The property's value if object has the property, otherwise NULL.
    107111@discussion If you named your function GetProperty, you would declare it like this:
    108112
    109 bool GetProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* returnValue, JSValueRef* exception);
    110 
    111 If this function returns false, the get request forwards to object's static property table, then its parent class chain (which includes the default object class), then its prototype chain.
     113JSValueRef GetProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     114
     115If this function returns NULL, the get request forwards to object's static property table, then its parent class chain (which includes the default object class), then its prototype chain.
     116*/
     117typedef JSValueRef
     118(*JSObjectGetPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     119
     120/*!
     121@typedef JSObjectSetPropertyCallback
     122@abstract The callback invoked when setting the value of a given property.
     123@param context The current execution context.
     124@param object The JSObject on which to set the property's value.
     125@param propertyName A JSString containing the name of the property to set.
     126@param value A JSValue to use as the property's value.
     127@param exception A pointer to a JSValueRef in which to return an exception, if any.
     128@result true if the property was set, otherwise false.
     129@discussion If you named your function SetProperty, you would declare it like this:
     130
     131bool SetProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);
     132
     133If this function returns false, the set request forwards to object's static property table, then its parent class chain (which includes the default object class).
    112134*/
    113135typedef bool
    114 (*JSGetPropertyCallback) (JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* returnValue, JSValueRef* exception);
    115 
    116 /*!
    117 @typedef JSSetPropertyCallback
    118 @abstract The callback invoked when setting the value of a given property.
    119 @param context The current execution context.
    120 @param object The JSObject on which to set the property's value.
    121 @param propertyName A JSInternalString containing the name of the property to set.
    122 @param value A JSValue to use as the property's value.
    123 @param exception A pointer to a JSValueRef in which to return an exception, if any.
    124 @result true if the property was successfully set, otherwise false.
    125 @discussion If you named your function SetProperty, you would declare it like this:
    126 
    127 bool SetProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef value, JSValueRef* exception);
    128 
    129 If this function returns false, the set request forwards to object's static property table, then its parent class chain (which includes the default object class).
    130 */
    131 typedef bool
    132 (*JSSetPropertyCallback) (JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef value, JSValueRef* exception);
    133 
    134 /*!
    135 @typedef JSDeletePropertyCallback
     136(*JSObjectSetPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);
     137
     138/*!
     139@typedef JSObjectDeletePropertyCallback
    136140@abstract The callback invoked when deleting a given property.
    137141@param context The current execution context.
    138142@param object The JSObject in which to delete the property.
    139 @param propertyName A JSInternalString containing the name of the property to delete.
     143@param propertyName A JSString containing the name of the property to delete.
    140144@param exception A pointer to a JSValueRef in which to return an exception, if any.
    141145@result true if propertyName was successfully deleted, otherwise false.
    142146@discussion If you named your function DeleteProperty, you would declare it like this:
    143147
    144 bool DeleteProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* exception);
     148bool DeleteProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
    145149
    146150If this function returns false, the delete request forwards to object's static property table, then its parent class chain (which includes the default object class).
    147151*/
    148152typedef bool
    149 (*JSDeletePropertyCallback) (JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef* exception);
    150 
    151 /*!
    152 @typedef JSGetPropertyListCallback
     153(*JSObjectDeletePropertyCallback) (JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     154
     155/*!
     156@typedef JSObjectAddPropertiesToListCallback
    153157@abstract The callback invoked when adding an object's properties to a property list.
    154158@param context The current execution context.
     
    158162@discussion If you named your function GetPropertyList, you would declare it like this:
    159163
    160 void GetPropertyList(JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
     164void AddPropertiesToList(JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
    161165
    162166Use JSPropertyListAdd to add properties to propertyList.
     
    165169*/
    166170typedef void
    167 (*JSGetPropertyListCallback) (JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
    168 
    169 /*!
    170 @typedef JSCallAsFunctionCallback
     171(*JSObjectAddPropertiesToListCallback) (JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
     172
     173/*!
     174@typedef JSObjectCallAsFunctionCallback
    171175@abstract The callback invoked when an object is called as a function.
    172176@param context The current execution context.
     
    186190*/
    187191typedef JSValueRef
    188 (*JSCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception);
    189 
    190 /*!
    191 @typedef JSCallAsConstructorCallback
     192(*JSObjectCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception);
     193
     194/*!
     195@typedef JSObjectCallAsConstructorCallback
    192196@abstract The callback invoked when an object is used as a constructor in a 'new' statement.
    193197@param context The current execution context.
     
    206210*/
    207211typedef JSObjectRef
    208 (*JSCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argc, JSValueRef argv[], JSValueRef* exception);
    209 
    210 /*!
    211 @typedef JSConvertToTypeCallback
     212(*JSObjectCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argc, JSValueRef argv[], JSValueRef* exception);
     213
     214/*!
     215@typedef JSObjectConvertToTypeCallback
    212216@abstract The callback invoked when converting an object to a particular JavaScript type.
    213217@param context The current execution context.
    214218@param object The JSObject to convert.
    215 @param typeCode A JSTypeCode specifying the JavaScript type to convert to.
    216 @param returnValue A pointer to a JSValue in which to store the converted value.
    217 @param exception A pointer to a JSValueRef in which to return an exception, if any.
    218 @result true if the value was converted, otherwise false. If this function returns true, returnValue is assumed to contain a valid JSValue.
     219@param type A JSType specifying the JavaScript type to convert to.
     220@param exception A pointer to a JSValueRef in which to return an exception, if any.
     221@result The objects's converted value, or NULL if the object was not converted.
    219222@discussion If you named your function ConvertToType, you would declare it like this:
    220223
    221 bool ConvertToType(JSContextRef context, JSObjectRef object, JSTypeCode typeCode, JSValueRef* returnValue, JSValueRef* exception);
     224JSValueRef ConvertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception);
    222225
    223226If this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class).
    224227*/
    225 typedef bool
    226 (*JSConvertToTypeCallback) (JSContextRef context, JSObjectRef object, JSTypeCode typeCode, JSValueRef* returnValue, JSValueRef* exception);
     228typedef JSValueRef
     229(*JSObjectConvertToTypeCallback) (JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception);
    227230
    228231/*!
     
    242245*/
    243246typedef struct {
    244     int                         version; // current (and only) version is 0
    245     JSInitializeCallback        initialize;
    246     JSFinalizeCallback          finalize;
    247     JSHasPropertyCallback       hasProperty;
    248     JSGetPropertyCallback       getProperty;
    249     JSSetPropertyCallback       setProperty;
    250     JSDeletePropertyCallback    deleteProperty;
    251     JSGetPropertyListCallback   getPropertyList;
    252     JSCallAsFunctionCallback    callAsFunction;
    253     JSCallAsConstructorCallback callAsConstructor;
    254     JSConvertToTypeCallback     convertToType;
     247    int                                 version; // current (and only) version is 0
     248    JSObjectInitializeCallback          initialize;
     249    JSObjectFinalizeCallback            finalize;
     250    JSObjectHasPropertyCallback         hasProperty;
     251    JSObjectGetPropertyCallback         getProperty;
     252    JSObjectSetPropertyCallback         setProperty;
     253    JSObjectDeletePropertyCallback      deleteProperty;
     254    JSObjectAddPropertiesToListCallback addPropertiesToList;
     255    JSObjectCallAsFunctionCallback      callAsFunction;
     256    JSObjectCallAsConstructorCallback  callAsConstructor;
     257    JSObjectConvertToTypeCallback       convertToType;
    255258} JSObjectCallbacks;
    256259
     
    270273@abstract This structure describes a static value property.
    271274@field name A null-terminated UTF8 string containing the property's name.
    272 @field getProperty A JSGetPropertyCallback to invoke when getting the property's value.
    273 @field setProperty A JSSetPropertyCallback to invoke when setting the property's value.
     275@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value.
     276@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value.
    274277@field attributes A logically ORed set of JSPropertyAttributes to give to the property.
    275278*/
    276279typedef struct {
    277280    const char* const name; // FIXME: convert UTF8
    278     JSGetPropertyCallback getProperty;
    279     JSSetPropertyCallback setProperty;
     281    JSObjectGetPropertyCallback getProperty;
     282    JSObjectSetPropertyCallback setProperty;
    280283    JSPropertyAttributes attributes;
    281284} JSStaticValue;
     
    285288@abstract This structure describes a static function property.
    286289@field name A null-terminated UTF8 string containing the property's name.
    287 @field callAsFunction A JSCallAsFunctionCallback to invoke when the property is called as a function.
     290@field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function.
    288291@field attributes A logically ORed set of JSPropertyAttributes to give to the property.
    289292*/
    290293typedef struct {
    291294    const char* const name; // FIXME: convert UTF8
    292     JSCallAsFunctionCallback callAsFunction;
     295    JSObjectCallAsFunctionCallback callAsFunction;
    293296    JSPropertyAttributes attributes;
    294297} JSStaticFunction;
     
    296299/*!
    297300@function
    298 @abstract Creates a JavaScript class suitable for use with JSObjectMake. Ownership follows the create rule.
     301@abstract Creates a JavaScript class suitable for use with JSObjectMake
    299302@param staticValues A JSStaticValue array representing the class's static value properties. Pass NULL to specify no static value properties. The array must be terminated by a JSStaticValue whose name field is NULL.
    300303@param staticFunctions A JSStaticFunction array representing the class's static function properties. Pass NULL to specify no static function properties. The array must be terminated by a JSStaticFunction whose name field is NULL.
    301304@param callbacks A pointer to a JSObjectCallbacks structure holding custom callbacks for supplementing default object behavior. Pass NULL to specify no custom behavior.
    302305@param parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class.
     306@result A JSClass with the given properties, callbacks, and parent class. Ownership follows the Create Rule.
    303307@discussion The simplest and most efficient way to add custom properties to a class is by specifying static values and functions. Standard JavaScript practice calls for functions to be placed in prototype objects, so that they can be shared among objects.
    304308*/
     
    332336@abstract Convenience method for creating a JavaScript function with a given callback as its implementation.
    333337@param context The execution context to use.
    334 @param callAsFunction The JSCallAsFunctionCallback to invoke when the function is called.
     338@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called.
    335339@result A JSObject that is an anonymous function. The object's prototype will be the default function prototype.
    336340*/
    337 JSObjectRef JSFunctionMake(JSContextRef context, JSCallAsFunctionCallback callAsFunction);
     341JSObjectRef JSObjectMakeFunction(JSContextRef context, JSObjectCallAsFunctionCallback callAsFunction);
    338342/*!
    339343@function
    340344@abstract Convenience method for creating a JavaScript constructor with a given callback as its implementation.
    341345@param context The execution context to use.
    342 @param callAsConstructor The JSCallAsConstructorCallback to invoke when the constructor is used in a 'new' statement.
     346@param callAsConstructor The JSObjectCallAsConstructorCallback to invoke when the constructor is used in a 'new' statement.
    343347@result A JSObject that is a constructor. The object's prototype will be the default object prototype.
    344348*/
    345 JSObjectRef JSConstructorMake(JSContextRef context, JSCallAsConstructorCallback callAsConstructor);
     349JSObjectRef JSObjectMakeConstructor(JSContextRef context, JSObjectCallAsConstructorCallback callAsConstructor);
    346350
    347351/*!
     
    349353@abstract Creates a function with a given script as its body.
    350354@param context The execution context to use.
    351 @param body A JSInternalString containing the script to use as the function's body.
    352 @param sourceURL A JSInternalString 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.
     355@param body A JSString containing the script to use as the function's body.
     356@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.
    353357@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.
    354358@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.
     
    356360@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution.
    357361*/
    358 JSObjectRef JSFunctionMakeWithBody(JSContextRef context, JSInternalStringRef body, JSInternalStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
     362JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
    359363
    360364/*!
     
    363367@param context The execution context to use.
    364368@param object The object whose description you want to get.
    365 @result A JSInternalString containing the object's description. This is usually the object's class name.
    366 */
    367 JSInternalStringRef JSObjectGetDescription(JSObjectRef object);
     369@result A JSString containing the object's description. This is usually the object's class name.
     370*/
     371JSStringRef JSObjectGetDescription(JSObjectRef object);
    368372
    369373/*!
     
    386390@abstract Tests whether an object has a certain property.
    387391@param object The JSObject to test.
    388 @param propertyName A JSInternalString containing the property's name.
     392@param propertyName A JSString containing the property's name.
    389393@result true if the object has a property whose name matches propertyName, otherwise false.
    390394*/
    391 bool JSObjectHasProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName);
     395bool JSObjectHasProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName);
    392396/*!
    393397@function
     
    395399@param context The execution context to use.
    396400@param object The JSObject whose property you want to get.
    397 @param propertyName A JSInternalString containing the property's name.
    398 @result The property's value, or NULL if the object does not have a property whose name matches propertyName.
    399 */
    400 JSValueRef JSObjectGetProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName);
     401@param propertyName A JSString containing the property's name.
     402@result The property's value if object has the property, otherwise NULL.
     403*/
     404JSValueRef JSObjectGetProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName);
    401405/*!
    402406@function
     
    404408@param context The execution context to use.
    405409@param object The JSObject whose property you want to set.
    406 @param propertyName A JSInternalString containing the property's name.
     410@param propertyName A JSString containing the property's name.
    407411@param value A JSValue to use as the property's value.
    408412@param attributes A logically ORed set of JSPropertyAttributes to give to the property.
    409413@result true if the set operation succeeds, otherwise false (for example, if the object already has a property of the given name with the kJSPropertyAttributeReadOnly attribute set).
    410414*/
    411 bool JSObjectSetProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes);
     415bool JSObjectSetProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes);
    412416/*!
    413417@function
     
    415419@param context The execution context to use.
    416420@param object The JSObject whose property you want to delete.
    417 @param propertyName A JSInternalString containing the property's name.
     421@param propertyName A JSString containing the property's name.
    418422@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
    419423*/
    420 bool JSObjectDeleteProperty(JSContextRef context, JSObjectRef object, JSInternalStringRef propertyName);
     424bool JSObjectDeleteProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName);
    421425
    422426/*!
     
    424428@abstract Gets a pointer to private data from an object.
    425429@param object A JSObject whose private data you want to get.
    426 @result A void* that points to the object's private data, or NULL if the object has no private data.
    427 @discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSFunctionMake, and JSConstructorMake.
     430@result A void* that points to the object's private data, if the object has private data, otherwise NULL.
     431@discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSObjectMakeFunction, and JSObjectMakeConstructor.
    428432*/
    429433void* JSObjectGetPrivate(JSObjectRef object);
     
    434438@param data A void* that points to the object's private data.
    435439@result true if the set operation succeeds, otherwise false.
    436 @discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSFunctionMake, and JSConstructorMake.
     440@discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSObjectMakeFunction, and JSObjectMakeConstructor.
    437441*/
    438442bool JSObjectSetPrivate(JSObjectRef object, void* data);
     
    481485@param context The execution context to use.
    482486@param object The object whose properties you want to enumerate.
    483 @result A JSPropertyEnumerator with a list of object's properties. Ownership follows the create rule.
     487@result A JSPropertyEnumerator with a list of object's properties. Ownership follows the Create Rule.
    484488*/
    485489JSPropertyEnumeratorRef JSObjectCreatePropertyEnumerator(JSContextRef context, JSObjectRef object);
     
    501505@abstract Gets a property enumerator's next property.
    502506@param enumerator The JSPropertyEnumerator whose next property you want to get.
    503 @result A JSInternalString containing the property's name, or NULL if all properties have been enumerated.
    504 */
    505 JSInternalStringRef JSPropertyEnumeratorGetNext(JSPropertyEnumeratorRef enumerator);
     507@result A JSString containing the property's name, or NULL if all properties have been enumerated.
     508*/
     509JSStringRef JSPropertyEnumeratorGetNextName(JSPropertyEnumeratorRef enumerator);
    506510
    507511/*!
    508512@function
    509513@abstract Adds a property to a property list.
    510 @discussion Use this method inside a JSGetPropertyListCallback to add a custom property to an object's property list.
     514@discussion Use this method inside a JSObjectAddPropertiesToListCallback to add a custom property to an object's property list.
    511515@param propertyList The JSPropertyList to which you want to add a property.
    512516@param thisObject The JSObject to which the property belongs.
    513 @param propertyName A JSInternalString specifying the property's name.
    514 */
    515 void JSPropertyListAdd(JSPropertyListRef propertyList, JSObjectRef thisObject, JSInternalStringRef propertyName);
     517@param propertyName A JSString specifying the property's name.
     518*/
     519void JSPropertyListAdd(JSPropertyListRef propertyList, JSObjectRef thisObject, JSStringRef propertyName);
    516520
    517521#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.