Clone in a terminal:
index.js
examples/threads/static/ - Remove threads with shared memory commit 9c53342
function loadWasm() {
    if (typeof SharedArrayBuffer !== "function") {
        console.error(
            "this browser does not have SharedArrayBuffer support enabled" +
                "\n\n" +
                msg,
        );
        return;
    }
    // Test for bulk memory operations with passive data segments
    //  (module (memory 1) (data passive ""))
    const buf = new Uint8Array([
        0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x05, 0x03, 0x01, 0x00,
        0x01, 0x0b, 0x03, 0x01, 0x01, 0x00,
    ]);
    if (!WebAssembly.validate(buf)) {
        console.error(
            "This browser does not support passive Wasm memory, Background threads will not work" +
                "\n\n" +
                msg,
        );
        return;
    }

    wasm_bindgen().catch(console.error);
}

loadWasm();

File history (3 commits)

321ec6b Johan Mattsson - johan.mattsson.m@gmail.com
Remove threads with shared memory
Remove threads with shared memory
6ce3ae3 Johan Mattsson - johan.mattsson.m@gmail.com
Clean up code and identify problems
Clean up code and identify problems
2145271 Johan Mattsson - johan.mattsson.m@gmail.com
Remove thread pool and provide a single function for spawning new threads
Remove thread pool and provide a single function for spawning new threads

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112