preloadWasm
ts
Fetch and compile the SDK's WebAssembly module ahead of init.
The compiled module is cached at the SDK module level. Calling
preloadWasm() more than once returns the same cached promise; subsequent
calls to init pick up the cached module automatically.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | { url?: string | URL; priority?: RequestPriority; } | - |
options.url? | string | URL | URL to fetch the wasm from. Defaults to the wasm co-located with the SDK. |
options.priority? | RequestPriority | Fetch priority hint. Use 'low' for background preloading. |
Returns
A promise that resolves to the compiled WebAssembly.Module.
Example
ts