Function mozjs_sys::jsapi::js::ToWindowIfWindowProxy

source ·
pub unsafe extern "C" fn ToWindowIfWindowProxy(
    obj: *mut JSObject,
) -> *mut JSObject
Expand description

If obj is a WindowProxy, get its associated Window (the compartment’s global), else return obj. This function is infallible and never returns nullptr.