Clone in a terminal:
index.js
examples/threads2/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 (2 commits)

321ec6b Johan Mattsson - johan.mattsson.m@gmail.com
Remove threads with shared memory
Remove threads with shared memory
c99003a Johan Mattsson - johan.mattsson.m@gmail.com
More thread ideas
More thread ideas

Contact

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