tailscale_tun.js: use WebAssembly.instatiate to avoid requiring MIME types
This commit is contained in:
parent
2c0f0bd894
commit
9cb4461560
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ export async function init() {
|
||||||
const lazyRunIpn = async () => {
|
const lazyRunIpn = async () => {
|
||||||
const wasmUrl = new URL("tailscale.wasm", import.meta.url);
|
const wasmUrl = new URL("tailscale.wasm", import.meta.url);
|
||||||
const go = new window.Go();
|
const go = new window.Go();
|
||||||
let {instance} = await WebAssembly.instantiateStreaming(fetch(wasmUrl),go.importObject);
|
let {instance} = await fetch(wasmUrl).then(x => x.arrayBuffer()).then(x => WebAssembly.instantiate(x,go.importObject));
|
||||||
go.run(instance);
|
go.run(instance);
|
||||||
|
|
||||||
const sessionStateStorage = {
|
const sessionStateStorage = {
|
||||||
|
|
Loading…
Reference in a new issue