Changeset 15224 in webkit for trunk/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jul 7, 2006, 7:02:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.h
r15168 r15224 35 35 #endif 36 36 37 /*! 38 @enum JSPropertyAttribute 39 @constant kJSPropertyAttributeNone Specifies that a property has no special attributes. 40 @constant kJSPropertyAttributeReadOnly Specifies that a property is read-only. 41 @constant kJSPropertyAttributeDontEnum Specifies that a property should not be enumerated by JSPropertyEnumerators and JavaScript for...in loops. 42 @constant kJSPropertyAttributeDontDelete Specifies that the delete operation should fail on a property. 43 */ 37 44 enum { 38 45 kJSPropertyAttributeNone = 0, … … 41 48 kJSPropertyAttributeDontDelete = 1 << 3 42 49 }; 50 51 /*! 52 @typedef JSPropertyAttributes 53 @abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together. 54 */ 43 55 typedef unsigned JSPropertyAttributes; 44 56 57 /*! 58 @typedef JSInitializeCallback 59 @abstract The callback invoked when an object is first created. 60 @param object The JSObject being created. 61 @discussion If you named your function Initialize, you would declare it like this: 62 63 void Initialize(JSObjectRef object); 64 */ 65 66 // FIXME: Needs to take a context argument, but can't because no context exists when we're creating the global object 45 67 typedef void 46 68 (*JSInitializeCallback) (JSObjectRef object); 47 69 70 /*! 71 @typedef JSFinalizeCallback 72 @abstract The callback invoked when an object is finalized (prepared for garbage collection). 73 @param object The JSObject being finalized. 74 @discussion If you named your function Finalize, you would declare it like this: 75 76 void Finalize(JSObjectRef object); 77 */ 48 78 typedef void 49 79 (*JSFinalizeCallback) (JSObjectRef object); 50 80 81 /*! 82 @typedef JSHasPropertyCallback 83 @abstract The callback invoked when determining whether an object has a given property. 84 @param context The current execution context. 85 @param object The JSObject to search for the property. 86 @param propertyName A JSStringBuffer containing the name of the property look up. 87 @result true if object has the property, otherwise false. 88 @discussion If you named your function HasProperty, you would declare it like this: 89 90 bool HasProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 91 92 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. 93 */ 51 94 typedef bool 52 (*JSHasPropertyCallback) (JSObjectRef object, JSStringBufferRef propertyName); 53 95 (*JSHasPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 96 97 /*! 98 @typedef JSGetPropertyCallback 99 @abstract The callback invoked when getting a property from an object. 100 @param context The current execution context. 101 @param object The JSObject to search for the property. 102 @param propertyName A JSStringBuffer containing the name of the property to get. 103 @param returnValue A pointer to a JSValue in which to store the property's value. 104 @result true if object has the property in question, otherwise false. If this function returns true, returnValue is assumed to contain a valid JSValue. 105 @discussion If you named your function GetProperty, you would declare it like this: 106 107 bool GetProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef* returnValue); 108 109 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. 110 */ 54 111 typedef bool 55 112 (*JSGetPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef* returnValue); 56 113 114 /*! 115 @typedef JSSetPropertyCallback 116 @abstract The callback invoked when setting the value of a given property. 117 @param context The current execution context. 118 @param object The JSObject on which to set the property's value. 119 @param propertyName A JSStringBuffer containing the name of the property to set. 120 @param value A JSValue to use as the property's value. 121 @result true if the property was successfully set, otherwise false. 122 @discussion If you named your function SetProperty, you would declare it like this: 123 124 bool SetProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef value); 125 126 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). 127 */ 57 128 typedef bool 58 (*JSSetPropertyCallback) (JSObjectRef object, JSStringBufferRef propertyName, JSValueRef value); 59 129 (*JSSetPropertyCallback) (JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef value); 130 131 /*! 132 @typedef JSDeletePropertyCallback 133 @abstract The callback invoked when deleting a given property. 134 @param context The current execution context. 135 @param object The JSObject in which to delete the property. 136 @param propertyName A JSStringBuffer containing the name of the property to delete. 137 @result true if propertyName was successfully deleted, otherwise false. 138 @discussion If you named your function DeleteProperty, you would declare it like this: 139 140 bool DeleteProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 141 142 If 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). 143 */ 60 144 typedef bool 61 (*JSDeletePropertyCallback) (JSObjectRef object, JSStringBufferRef propertyName); 62 145 (*JSDeletePropertyCallback) (JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 146 147 /*! 148 @typedef JSGetPropertyListCallback 149 @abstract The callback invoked when adding an object's properties to a property list. 150 @param context The current execution context. 151 @param object The JSObject whose properties need to be added to propertyList. 152 @param propertyList A JavaScript property list that will be used to enumerate object's properties. 153 @discussion If you named your function GetPropertyList, you would declare it like this: 154 155 void GetPropertyList(JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList); 156 157 Use JSPropertyListAdd to add properties to propertyList. 158 159 Property lists are used by JSPropertyEnumerators and JavaScript for...in loops. 160 */ 63 161 typedef void 64 (*JSGetPropertyListCallback) (JSObjectRef object, JSPropertyListRef propertyList); 65 162 (*JSGetPropertyListCallback) (JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList); 163 164 /*! 165 @typedef JSCallAsFunctionCallback 166 @abstract The callback invoked when an object is called as a function. 167 @param context The current execution context. 168 @param function A JSObject that is the function being called. 169 @param thisObject A JSObject that is the 'this' variable in the function's scope. 170 @param argc An integer count of the number of arguments in argv. 171 @param argv A JSValue array of the arguments passed to the function. 172 @result A JSValue that is the function's return value. 173 @discussion If you named your function CallAsFunction, you would declare it like this: 174 175 JSValueRef CallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, JSValueRef argv[]); 176 177 If your callback were invoked by the JavaScript expression 'myObject.myMemberFunction()', function would be set to myMemberFunction, and thisObject would be set to myObject. 178 179 If this callback is NULL, calling your object as a function will throw an exception. 180 */ 66 181 typedef JSValueRef 67 (*JSCallAsFunctionCallback) (JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argc, JSValueRef argv[]); 68 182 (*JSCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, JSValueRef argv[]); 183 184 /*! 185 @typedef JSCallAsConstructorCallback 186 @abstract The callback invoked when an object is used as a constructor in a 'new' statement. 187 @param context The current execution context. 188 @param constructor A JSObject that is the constructor being called. 189 @param argc An integer count of the number of arguments in argv. 190 @param argv A JSValue array of the arguments passed to the function. 191 @result A JSObject that is the constructor's return value. 192 @discussion If you named your function CallAsConstructor, you would declare it like this: 193 194 JSObjectRef CallAsConstructor(JSContextRef context, JSObjectRef constructor, size_t argc, JSValueRef argv[]); 195 196 If your callback were invoked by the JavaScript expression 'new myConstructorFunction()', constructor would be set to myConstructorFunction. 197 198 If this callback is NULL, using your object as a constructor in a 'new' statement will throw an exception. 199 */ 69 200 typedef JSObjectRef 70 (*JSCallAsConstructorCallback) (JSContextRef context, JSObjectRef object, size_t argc, JSValueRef argv[]); 71 201 (*JSCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argc, JSValueRef argv[]); 202 203 /*! 204 @typedef JSConvertToTypeCallback 205 @abstract The callback invoked when converting an object to a particular JavaScript type. 206 @param context The current execution context. 207 @param object The JSObject to convert. 208 @param typeCode A JSTypeCode specifying the JavaScript type to convert to. 209 @param returnValue A pointer to a JSValue in which to store the converted value. 210 @result true if the value was converted, otherwise false. If this function returns true, returnValue is assumed to contain a valid JSValue. 211 @discussion If you named your function ConvertToType, you would declare it like this: 212 213 bool ConvertToType(JSContextRef context, JSObjectRef object, JSTypeCode typeCode, JSValueRef* returnValue); 214 215 If this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class). 216 */ 72 217 typedef bool 73 (*JSConvertToTypeCallback) (JSObjectRef object, JSTypeCode typeCode, JSValueRef* returnValue); 74 75 typedef struct __JSObjectCallbacks { 218 (*JSConvertToTypeCallback) (JSContextRef context, JSObjectRef object, JSTypeCode typeCode, JSValueRef* returnValue); 219 220 /*! 221 @struct JSObjectCallbacks 222 @abstract This structure contains optional callbacks for supplementing default object behavior. Any callback field can be NULL. 223 @field version The version number of this structure. The current version is 0. 224 @field initialize The callback invoked when an object is first created. Use this callback in conjunction with JSObjectSetPrivate to initialize private data in your object. 225 @field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for your object, and perform other cleanup. 226 @field hasProperty The callback invoked when determining whether an object has a given property. If this field is NULL, getProperty will be called instead. The hasProperty 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. 227 @field getProperty The callback invoked when getting the value of a given property. 228 @field setProperty The callback invoked when setting the value of a given property. 229 @field deleteProperty The callback invoked when deleting a given property. 230 @field getPropertyList The callback invoked when adding an object's properties to a property list. 231 @field callAsFunction The callback invoked when an object is called as a function. 232 @field callAsConstructor The callback invoked when an object is used as a constructor in a 'new' statement. 233 @field convertToType The callback invoked when converting an object to a particular JavaScript type. 234 */ 235 typedef struct { 76 236 int version; // current (and only) version is 0 77 237 JSInitializeCallback initialize; … … 87 247 } JSObjectCallbacks; 88 248 249 /*! 250 @const kJSObjectCallbacksNone 251 @abstract A JSObjectCallbacks structure of the current version, filled with NULL callbacks. 252 @discussion Use this constant as a convenience when creating callback structures. For example, to create a callback structure that has only a finalize method: 253 254 JSObjectCallbacks callbacks = kJSObjectCallbacksNone; 255 256 callbacks.finalize = Finalize; 257 */ 89 258 extern const JSObjectCallbacks kJSObjectCallbacksNone; 90 259 260 /*! 261 @struct JSStaticValue 262 @abstract This structure describes a static value property. 263 @field name A UTF8 buffer containing the property's name. 264 @field getProperty A JSGetPropertyCallback to invoke when getting the property's value. 265 @field setProperty A JSSetPropertyCallback to invoke when setting the property's value. 266 @field attributes A logically ORed set of JSPropertyAttributes to give to the property. 267 */ 91 268 typedef struct { 92 269 const char* const name; // FIXME: convert UTF8 … … 96 273 } JSStaticValue; 97 274 275 /*! 276 @struct JSStaticFunction 277 @abstract This structure describes a static function property. 278 @field name A UTF8 buffer containing the property's name. 279 @field callAsFunction A JSCallAsFunctionCallback to invoke when the property is called as a function. 280 @field attributes A logically ORed set of JSPropertyAttributes to give to the property. 281 */ 98 282 typedef struct { 99 283 const char* const name; // FIXME: convert UTF8 … … 102 286 } JSStaticFunction; 103 287 104 JSClassRef JSClassCreate(JSContextRef context, JSStaticValue* staticValues, JSStaticFunction* staticFunctions, const JSObjectCallbacks* callbacks, JSClassRef parentClass); 288 /*! 289 @function 290 @abstract Creates a JavaScript class suitable for use with JSObjectMake. Ownership follows the create rule. 291 @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. 292 @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. 293 @param callbacks A pointer to a JSObjectCallbacks structure holding custom callbacks for supplementing default object behavior. Pass NULL to specify no custom behavior. 294 @param parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class. 295 @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. 296 */ 297 JSClassRef JSClassCreate(JSStaticValue* staticValues, JSStaticFunction* staticFunctions, const JSObjectCallbacks* callbacks, JSClassRef parentClass); 298 /*! 299 @function 300 @abstract Retains a JavaScript class. 301 @param jsClass The JSClass to retain. 302 @result A JSClass that is the same as jsClass. 303 */ 304 JSClassRef JSClassRetain(JSClassRef jsClass); 305 /*! 306 @function 307 @abstract Releases a JavaScript class. 308 @param jsClass The JSClass to release. 309 */ 105 310 void JSClassRelease(JSClassRef jsClass); 106 JSClassRef JSClassRetain(JSClassRef jsClass); 107 108 // pass NULL as prototype to get the built-in object prototype 311 312 /*! 313 @function 314 @abstract Creates a JavaScript object with a given class and prototype. 315 @param context The execution context to use. 316 @param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. 317 @param prototype The prototype to assign to the object. Pass NULL to use the default object prototype. 318 @result A JSObject with the given class and prototype. 319 */ 109 320 JSObjectRef JSObjectMake(JSContextRef context, JSClassRef jsClass, JSObjectRef prototype); 110 321 111 // Will be assigned the built-in function prototype 322 /*! 323 @function 324 @abstract Convenience method for creating a JavaScript function with a given callback as its implementation. 325 @param context The execution context to use. 326 @param callAsFunction The JSCallAsFunctionCallback to invoke when the function is called. 327 @result A JSObject that is an anonymous function. The object's prototype will be the default function prototype. 328 */ 112 329 JSObjectRef JSFunctionMake(JSContextRef context, JSCallAsFunctionCallback callAsFunction); 113 // Will be assigned the built-in object prototype 330 /*! 331 @function 332 @abstract Convenience method for creating a JavaScript constructor with a given callback as its implementation. 333 @param context The execution context to use. 334 @param callAsConstructor The JSCallAsConstructorCallback to invoke when the constructor is used in a 'new' statement. 335 @result A JSObject that is a constructor. The object's prototype will be the default object prototype. 336 */ 114 337 JSObjectRef JSConstructorMake(JSContextRef context, JSCallAsConstructorCallback callAsConstructor); 115 338 116 // returns NULL if functionBody has a syntax error 117 JSObjectRef JSFunctionMakeWithBody(JSContextRef context, JSStringBufferRef body, JSStringBufferRef sourceURL, int startingLineNumber); 118 339 /*! 340 @function 341 @abstract Creates a function with a given script as its body. 342 @param context The execution context to use. 343 @param body A JSStringBuffer containing the script to use as the function's body. 344 @param sourceURL A JSStringBuffer 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. 345 @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. 346 @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. 347 @result A JSObject that is an anonymous function, or NULL if body contains a syntax error. The returned object's prototype will be the default function prototype. 348 @discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. 349 */ 350 JSObjectRef JSFunctionMakeWithBody(JSContextRef context, JSStringBufferRef body, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception); 351 352 /*! 353 @function 354 @abstract Gets a short description of a JavaScript object. 355 @param context The execution context to use. 356 @param object The object whose description you want to get. 357 @result A JSStringBuffer containing the object's description. This is usually the object's class name. 358 */ 119 359 JSStringBufferRef JSObjectGetDescription(JSObjectRef object); 120 360 361 /*! 362 @function 363 @abstract Gets an object's prototype. 364 @param object A JSObject whose prototype you want to get. 365 @result A JSValue containing the object's prototype. 366 */ 121 367 JSValueRef JSObjectGetPrototype(JSObjectRef object); 368 /*! 369 @function 370 @abstract Sets an object's prototype. 371 @param object The JSObject whose prototype you want to set. 372 @param value A JSValue to set as the object's prototype. 373 */ 122 374 void JSObjectSetPrototype(JSObjectRef object, JSValueRef value); 123 375 376 /*! 377 @function 378 @abstract Tests whether an object has a certain property. 379 @param object The JSObject to test. 380 @param propertyName A JSStringBuffer containing the property's name. 381 @result true if the object has a property whose name matches propertyName, otherwise false. 382 */ 124 383 bool JSObjectHasProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 384 /*! 385 @function 386 @abstract Gets a property from an object. 387 @param context The execution context to use. 388 @param object The JSObject whose property you want to get. 389 @param propertyName A JSStringBuffer containing the property's name. 390 @param value A pointer to a JSValueRef in which to store the property's value. On return, value will contain the property's value. Pass NULL if you do not care to store the property's value. 391 @result true if the object has a property whose name matches propertyName, otherwise false. If this function returns false, the contents of value will be unmodified. 392 */ 125 393 bool JSObjectGetProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef* value); 394 /*! 395 @function 396 @abstract Sets a property on an object. 397 @param context The execution context to use. 398 @param object The JSObject whose property you want to set. 399 @param propertyName A JSStringBuffer containing the property's name. 400 @param value A JSValue to use as the property's value. 401 @param attributes A logically ORed set of JSPropertyAttributes to give to the property. 402 @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). 403 */ 126 404 bool JSObjectSetProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName, JSValueRef value, JSPropertyAttributes attributes); 405 /*! 406 @function 407 @abstract Deletes a property from an object. 408 @param context The execution context to use. 409 @param object The JSObject whose property you want to delete. 410 @param propertyName A JSStringBuffer containing the property's name. 411 @result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). 412 */ 127 413 bool JSObjectDeleteProperty(JSContextRef context, JSObjectRef object, JSStringBufferRef propertyName); 128 414 129 // Only works with objects created by JSObjectMake 415 /*! 416 @function 417 @abstract Gets a pointer to private data from an object. 418 @param object A JSObject whose private data you want to get. 419 @result A void* that points to the object's private data, or NULL if the object has no private data. 420 @discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSFunctionMake, and JSConstructorMake. 421 */ 130 422 void* JSObjectGetPrivate(JSObjectRef object); 423 /*! 424 @function 425 @abstract Sets a pointer to private data on an object. 426 @param object A JSObject whose private data you want to set. 427 @param data A void* that points to the object's private data. 428 @result true if the set operation succeeds, otherwise false. 429 @discussion JSObjectGetPrivate and JSObjectSetPrivate only work on custom objects created by JSObjectMake, JSFunctionMake, and JSConstructorMake. 430 */ 131 431 bool JSObjectSetPrivate(JSObjectRef object, void* data); 132 432 433 /*! 434 @function 435 @abstract Tests whether an object is a function. 436 @param object The JSObject to test. 437 @result true if the object is a function, otherwise false. 438 */ 133 439 bool JSObjectIsFunction(JSObjectRef object); 440 /*! 441 @function 442 @abstract Calls an object as a function. 443 @param context The execution context to use. 444 @param object The JSObject to call as a function. 445 @param thisObject The JSObject to use as 'this' in the function call. 446 @param argc An integer count of the number of arguments in argv. 447 @param argv A JSValue array of the arguments to pass to the function. 448 @param exception A pointer to a JSValueRef in which to store an uncaught exception, if any. Pass NULL if you do not care to store an uncaught exception. 449 @result The JSValue that results from calling object as a function, or NULL if an uncaught exception is thrown or object is not a function. 450 */ 134 451 JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception); 452 /*! 453 @function 454 @abstract Tests whether an object is a constructor. 455 @param object The JSObject to test. 456 @result true if the object is a constructor, otherwise false. 457 */ 135 458 bool JSObjectIsConstructor(JSObjectRef object); 459 /*! 460 @function 461 @abstract Calls an object as a constructor. 462 @param context The execution context to use. 463 @param object The JSObject to call as a constructor. 464 @param argc An integer count of the number of arguments in argv. 465 @param argv A JSValue array of the arguments to pass to the function. 466 @param exception A pointer to a JSValueRef in which to store an uncaught exception, if any. Pass NULL if you do not care to store an uncaught exception. 467 @result The JSObject that results from calling object as a constructor, or NULL if an uncaught exception is thrown or object is not a constructor. 468 */ 136 469 JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argc, JSValueRef argv[], JSValueRef* exception); 137 470 138 // Used for enumerating the names of an object's properties like a for...in loop would 471 /*! 472 @function 473 @abstract Creates an enumerator for an object's properties. 474 @param context The execution context to use. 475 @param object The object whose properties you want to enumerate. 476 @result A JSPropertyEnumerator with a list of object's properties. Ownership follows the create rule. 477 */ 139 478 JSPropertyEnumeratorRef JSObjectCreatePropertyEnumerator(JSContextRef context, JSObjectRef object); 479 /*! 480 @function 481 @abstract Retains a property enumerator. 482 @param enumerator The JSPropertyEnumerator to retain. 483 @result A JSPropertyEnumerator that is the same as enumerator. 484 */ 140 485 JSPropertyEnumeratorRef JSPropertyEnumeratorRetain(JSPropertyEnumeratorRef enumerator); 486 /*! 487 @function 488 @abstract Releases a property enumerator. 489 @param enumerator The JSPropertyEnumerator to release. 490 */ 141 491 void JSPropertyEnumeratorRelease(JSPropertyEnumeratorRef enumerator); 492 /*! 493 @function 494 @abstract Gets a property enumerator's next property. 495 @param context The execution context to use. 496 @param enumerator The JSPropertyEnumerator whose next property you want to get. 497 @result A JSStringBuffer containing the property's name, or NULL if all properties have been enumerated. 498 */ 142 499 JSStringBufferRef JSPropertyEnumeratorGetNext(JSContextRef context, JSPropertyEnumeratorRef enumerator); 143 500 144 // Used for adding property names to a for...in enumeration 501 /*! 502 @function 503 @abstract Adds a property to a property list. 504 @discussion Use this method inside a JSGetPropertyListCallback to add a custom property to an object's property list. 505 @param propertyList The JSPropertyList to which you want to add a property. 506 @param thisObject The JSObject to which the property belongs. 507 @param propertyName A JSStringBuffer specifying the property's name. 508 */ 145 509 void JSPropertyListAdd(JSPropertyListRef propertyList, JSObjectRef thisObject, JSStringBufferRef propertyName); 146 510
Note:
See TracChangeset
for help on using the changeset viewer.