Skip to main content

define_property

Function define_property 

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

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

MDN documentation