JSObjectHasProperty

Function JSObjectHasProperty 

Source
pub unsafe extern "C-unwind" fn JSObjectHasProperty(
    ctx: JSContextRef,
    object: JSObjectRef,
    property_name: JSStringRef,
) -> bool
Available on crate features JSBase and JSObjectRef only.
Expand description

Tests whether an object has a given property.

Parameter object: The JSObject to test.

Parameter propertyName: A JSString containing the property’s name.

Returns: true if the object has a property whose name matches propertyName, otherwise false.

§Safety

  • ctx must be a valid pointer.
  • object must be a valid pointer.
  • property_name must be a valid pointer.