JsWebApis constructor

const JsWebApis({
  1. Set<JsWebModule> modules = const {JsWebModule.core},
  2. JsFetchOptions? fetch,
  3. String userAgent = _defaultUserAgent,
})

Installs modules and everything they require.

Defaults to JsWebModule.core alone. A non-null fetch additionally installs JsWebModule.fetch, so JsWebApis(fetch: ...) gives you a context with fetch and the types it needs.

Implementation

const JsWebApis({
  this.modules = const {JsWebModule.core},
  this.fetch,
  this.userAgent = _defaultUserAgent,
});