install static method
Install the configured modules into runtime's current context.
Takes ownership of natives.
Implementation
static WebApiHost install(
JavascriptRuntime runtime,
JsWebApis config,
Object? natives,
) {
final host = WebApiHost._(runtime, config);
try {
host._install(natives);
} catch (_) {
host.dispose();
rethrow;
} finally {
if (natives is JSRef) natives.free();
}
return host;
}