$ModuleWebAssembly$Typings extension
Properties
-
instantiate
→ ({Future<
WebAssemblyInstantiatedSource> Function(Object bytes, [dynamic importObject]) $1, Future<Instance> Function(Module moduleObject, [dynamic importObject]) $2}) -
Available on $ModuleWebAssembly, provided by the $ModuleWebAssembly$Typings extension
Overload accessor: $1, $2no setter
Methods
-
compile(
Object bytes) → Future< Module> -
Available on $ModuleWebAssembly, provided by the $ModuleWebAssembly$Typings extension
TheWebAssembly.compile()
function compiles WebAssembly binary code into aWebAssembly.Module
object. This function is useful if it is necessary to compile a module before it can be instantiated (otherwise, theWebAssembly.instantiate()
function should be used). -
compileStreaming(
Object source) → Future< Module> -
Available on $ModuleWebAssembly, provided by the $ModuleWebAssembly$Typings extension
TheWebAssembly.compileStreaming()
function compiles aWebAssembly.Module
directly from a streamed underlying source. This function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, theWebAssembly.instantiateStreaming()
function should be used). -
instantiateStreaming(
Object response, [dynamic importObject]) → Future< WebAssemblyInstantiatedSource> -
Available on $ModuleWebAssembly, provided by the $ModuleWebAssembly$Typings extension
TheWebAssembly.instantiateStreaming()
function compiles and instantiates a WebAssembly module directly from a streamed underlying source. This is the most efficient, optimized way to load wasm code. -
validate(
Object bytes) → bool -
Available on $ModuleWebAssembly, provided by the $ModuleWebAssembly$Typings extension
TheWebAssembly.validate()
function validates a given typed array of WebAssembly binary code, returning whether the bytes form a valid wasm module (true
) or not (false
).