Skip to main content

JS_NewObjectWithGivenProto

Function JS_NewObjectWithGivenProto 

Source
pub fn JS_NewObjectWithGivenProto(
    cx: &mut JSContext,
    clasp: Option<&'static JSClass>,
    proto: HandleObject<'_>,
) -> *mut JSObject
Expand description

Safe wrapper around js::rust::wrappers2::JS_NewObjectWithGivenProto. Passing None for clasp creates a plain object.