Skip to main content

get_own_property_descriptor_str

Function get_own_property_descriptor_str 

Source
pub fn get_own_property_descriptor_str<T>(
    target: &Object<T>,
    property_key: &JsString,
) -> Result<PropertyDescriptor<T>, JsValue>
where Object<T>: ErasableGenericBorrow<Object<JsValue>>, PropertyDescriptor<T>: ErasableGenericOwn<PropertyDescriptor<JsValue>>,
Expand description

The static Reflect.getOwnPropertyDescriptor() method is similar to Object.getOwnPropertyDescriptor(). It returns a property descriptor of the given property if it exists on the object, undefined otherwise.

MDN documentation