Function js::jsapi::JS_DefinePropertyById1 [] [src]

pub unsafe extern "C" fn JS_DefinePropertyById1(
    cx: *mut JSContext,
    obj: HandleObject,
    id: HandleId,
    desc: Handle<PropertyDescriptor>
) -> bool

Define a property on obj, throwing a TypeError if the attempt fails. This is the C++ equivalent of Object.defineProperty(obj, id, desc).