Skip to main content

define_property_str

Function define_property_str 

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

The static Reflect.defineProperty() method is like Object.defineProperty() but returns a Boolean.

MDN documentation