Function script::dom::bindings::import::module::jsapi::EnterRealm

source ยท
pub unsafe extern "C" fn EnterRealm(
    cx: *mut JSContext,
    target: *mut JSObject,
) -> *mut Realm
Expand description

NB: This API is infallible; a nullptr return value does not indicate error.

|target| must not be a cross-compartment wrapper because CCWs are not associated with a single realm.

Entering a realm roots the realm and its global object until the matching JS::LeaveRealm() call.