js_sys::Reflect

Function define_property

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

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

MDN documentation