Function mozjs::jsapi::SetModuleDynamicImportHook
source ยท pub unsafe extern "C" fn SetModuleDynamicImportHook(
rt: *mut JSRuntime,
func: Option<unsafe extern "C" fn(_: *mut JSContext, _: Handle<Value>, _: Handle<*mut JSObject>, _: Handle<*mut JSObject>) -> bool>,
)
Expand description
Set the HostImportModuleDynamically hook for the runtime to the given function.
If this hook is not set (or set to nullptr) then the JS engine will throw an exception if dynamic module import is attempted.