Platforms to show: All Mac Windows Linux Cross-Platform
Back to JSObjectMBS class.
JSObjectMBS.CallAsConstructor(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
self: The JSObject to call as a constructor.
arguments: A JSValueMBS array of arguments to pass to the constructor.
JSException A pointer to a JSValueMBS in which to store an exception, if any.
Returns the JSObject that results from calling object as a constructor, or nil if an exception is thrown or object is not a constructor.
JSObjectMBS.CallAsFunction(thisObject as JSValueMBS, arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
self: The JSObject to call as a function.
thisObject: The object to use as "this," or nil to use the global object as "this."
arguments: A JSValueMBS array of arguments to pass to the function.
JSException: A JSValueMBS in which to store an exception, if any.
Returns the JSValue that results from calling object as a function, or nil if an exception is thrown or object is not a function.
JSObjectMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
JSObjectMBS.DeleteProperty(name as string, byref JSException as JSValueMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Name: A string containing the property's name.
JSException: A JSValueMBS in which to store an exception, if any.
Returns true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
JSObjectMBS.GetProperty(name as string, byref JSException as JSValueMBS) as JSValueMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
object: The JSObject whose property you want to get.
Name: A string containing the property's name.
JSException: A JSValueMBS in which to store an exception, if any.
Returns the property's value if object has the property, otherwise the undefined value.
JSObjectMBS.GetPropertyAtIndex(propertyIndex as Integer, byref JSException as JSValueMBS) as JSValueMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The JSObject whose property you want to get.
propertyIndex: An integer value that is the property's name.
JSException: A JSValueMBS in which to store an exception, if any.
Returns the property's value if object has the property, otherwise the undefined value.
Calling GetPropertyAtIndex is equivalent to calling GetProperty with a string containing propertyIndex, but GetPropertyAtIndex provides optimized access to numeric properties.
JSObjectMBS.HasProperty(name as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
name: A string containing the property's name.
Returns true if the object has a property whose name matches propertyName, otherwise false.
JSObjectMBS.PropertyNames as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
JSObjectMBS.SetProperty(name as string, value as JSValueMBS, byref JSException as JSValueMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Name: A string containing the property's name.
Value: A JSValue to use as the property's value.
JSException A pointer to a JSValueRef in which to store an exception, if any.
JSObjectMBS.SetPropertyAtIndex(propertyIndex as Integer, value as JSValueMBS, byref JSException as JSValueMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | JavaScript | MBS MacFrameworks Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
propertyIndex: The property's name as a number.
value: A JSValue to use as the property's value.
exception: A JSValueMBS in which to store an exception, if any.
Calling SetPropertyAtIndex is equivalent to calling SetProperty with a string containing propertyIndex, but SetPropertyAtIndex provides optimized access to numeric properties.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.