WasmExecJS returns the path to the Go toolchain's wasm_exec.js, the JavaScript support file needed to run Go wasm binaries.
()
| 33 | // WasmExecJS returns the path to the Go toolchain's wasm_exec.js, |
| 34 | // the JavaScript support file needed to run Go wasm binaries. |
| 35 | func WasmExecJS() (string, error) { |
| 36 | goroot, err := GoRoot() |
| 37 | if err != nil { |
| 38 | return "", err |
| 39 | } |
| 40 | return filepath.Join(goroot, "lib", "wasm", "wasm_exec.js"), nil |
| 41 | } |
| 42 | |
| 43 | // keep is the set of tailscale.com feature tags the wasm build needs |
| 44 | // linked; every other feature in the featuretags registry is excluded |