instantiateModule method

Future<WebAssemblyInstantiatedSource> instantiateModule(
  1. Response response
)

Instantiates a module by calling WebAssembly.instantiateStreaming with the response and createImportObject.

Implementation

Future<web.WebAssemblyInstantiatedSource> instantiateModule(
  web.Response response,
) {
  return web.WebAssembly.instantiateStreaming(
    response as JSPromise<web.Response>,
    createImportObject(),
  ).toDart;
}