Changeset 246265 in webkit for trunk/Source/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jun 10, 2019, 9:35:00 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.h
r243376 r246265 1 1 /* 2 * Copyright (C) 2006 , 2007Apple Inc. All rights reserved.2 * Copyright (C) 2006-2019 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Kelvin W Sherlock ([email protected]) 4 4 * … … 478 478 479 479 /*! 480 @function 481 @abstract Creates a JavaScript promise object by invoking the provided executor. 482 @param ctx The execution context to use. 483 @param resolve A pointer to a JSObjectRef in which to store the resolve function for the new promise. Pass NULL if you do not care to store the resolve callback. 484 @param reject A pointer to a JSObjectRef in which to store the reject function for the new promise. Pass NULL if you do not care to store the reject callback. 485 @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. 486 @result A JSObject that is a promise or NULL if an exception occurred. 487 */ 488 JS_EXPORT JSObjectRef JSObjectMakeDeferredPromise(JSContextRef ctx, JSObjectRef* resolve, JSObjectRef* reject, JSValueRef* exception) JSC_API_AVAILABLE(macos(10.15), ios(13.0)); 489 490 /*! 480 491 @function 481 492 @abstract Creates a function with a given script as its body. … … 555 566 556 567 /*! 568 @function 569 @abstract Tests whether an object has a given property using a JSValueRef as the property key. 570 @param object The JSObject to test. 571 @param propertyKey A JSValueRef containing the property key to use when looking up the property. 572 @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. 573 @result true if the object has a property whose name matches propertyKey, otherwise false. 574 @discussion This function is the same as performing "propertyKey in object" from JavaScript. 575 */ 576 JS_EXPORT bool JSObjectHasPropertyForKey(JSContextRef ctx, JSObjectRef object, JSValueRef propertyKey, JSValueRef* exception) JSC_API_AVAILABLE(macos(10.15), ios(13.0)); 577 578 /*! 579 @function 580 @abstract Gets a property from an object using a JSValueRef as the property key. 581 @param ctx The execution context to use. 582 @param object The JSObject whose property you want to get. 583 @param propertyKey A JSValueRef containing the property key to use when looking up the property. 584 @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. 585 @result The property's value if object has the property key, otherwise the undefined value. 586 @discussion This function is the same as performing "object[propertyKey]" from JavaScript. 587 */ 588 JS_EXPORT JSValueRef JSObjectGetPropertyForKey(JSContextRef ctx, JSObjectRef object, JSValueRef propertyKey, JSValueRef* exception) JSC_API_AVAILABLE(macos(10.15), ios(13.0)); 589 590 /*! 591 @function 592 @abstract Sets a property on an object using a JSValueRef as the property key. 593 @param ctx The execution context to use. 594 @param object The JSObject whose property you want to set. 595 @param propertyKey A JSValueRef containing the property key to use when looking up the property. 596 @param value A JSValueRef to use as the property's value. 597 @param attributes A logically ORed set of JSPropertyAttributes to give to the property. 598 @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. 599 @discussion This function is the same as performing "object[propertyKey] = value" from JavaScript. 600 */ 601 JS_EXPORT void JSObjectSetPropertyForKey(JSContextRef ctx, JSObjectRef object, JSValueRef propertyKey, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception) JSC_API_AVAILABLE(macos(10.15), ios(13.0)); 602 603 /*! 604 @function 605 @abstract Deletes a property from an object using a JSValueRef as the property key. 606 @param ctx The execution context to use. 607 @param object The JSObject whose property you want to delete. 608 @param propertyKey A JSValueRef containing the property key to use when looking up the property. 609 @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. 610 @result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). 611 @discussion This function is the same as performing "delete object[propertyKey]" from JavaScript. 612 */ 613 JS_EXPORT bool JSObjectDeletePropertyForKey(JSContextRef ctx, JSObjectRef object, JSValueRef propertyKey, JSValueRef* exception) JSC_API_AVAILABLE(macos(10.15), ios(13.0)); 614 615 /*! 557 616 @function 558 617 @abstract Gets a property from an object by numeric index.
Note:
See TracChangeset
for help on using the changeset viewer.