Type Definition js::jsapi::JSWrapObjectCallback
[−]
[src]
type JSWrapObjectCallback = Option<unsafe extern "C" fn(cx: *mut JSContext, existing: HandleObject, obj: HandleObject) -> *mut JSObject>;
Callback used to ask the embedding for the cross compartment wrapper handler that implements the desired prolicy for this kind of object in the destination compartment. |obj| is the object to be wrapped. If |existing| is non-nullptr, it will point to an existing wrapper object that should be re-used if possible. |existing| is guaranteed to be a cross-compartment wrapper with a lazily-defined prototype and the correct global. It is guaranteed not to wrap a function.