Type Definition v8::HostCreateShadowRealmContextCallback
source · pub type HostCreateShadowRealmContextCallback = for<'s> fn(scope: &mut HandleScope<'s>) -> Option<Local<'s, Context>>;Expand description
HostCreateShadowRealmContextCallback is called each time a ShadowRealm
is being constructed. You can use HandleScope::get_current_context to
get the Context in which the constructor is being run.
The method combines Context creation and the implementation-defined
abstract operation HostInitializeShadowRealm into one.
The embedder should use Context::new to create a new context. If the
creation fails, the embedder must propagate that exception by returning
None.