Type Definition js::jsapi::JSPreWrapCallback [] [src]

type JSPreWrapCallback = Option<unsafe extern "C" fn(cx: *mut JSContext, scope: HandleObject, obj: HandleObject, objectPassedToWrap: HandleObject) -> *mut JSObject>;

Callback used by the wrap hook to ask the embedding to prepare an object for wrapping in a context. This might include unwrapping other wrappers or even finding a more suitable object for the new compartment.