🎓 A1Learner
🔍
0 of 50 lessons completed

WebAssembly Browser Support

WebAssembly runs in every modern browser. Newer features arrive browser by browser, so versions matter.

Check that WebAssembly exists

One line tells you if the browser has WebAssembly.

console.log(typeof WebAssembly);

Check the same fact another way

A second check gives a plain true or false answer.

console.log("WebAssembly" in globalThis);

Example

if (typeof WebAssembly === "object") {
  console.log("WebAssembly is available.");
} else {
  console.log("WebAssembly is missing.");
}

Key points

  • WasmGC is built-in memory cleanup for languages that manage memory for you.
  • WasmGC ships in Chrome 119, Firefox 120, and Safari 18.2.
  • SIMD is one instruction that works on many numbers at once.
  • SIMD ships in modern browsers, and exact versions vary by feature.
  • Threads let a module split work across cores, and they ship in modern browsers with extra setup.

In this example, the code checks for WebAssembly and reports what it finds. A modern browser reports that WebAssembly is available. WebAssembly runs in every modern browser, but new features still need a version check.

Note

Test your target browsers before you rely on a new feature.

Try it Yourself

Edit the code, then press Run.

Runs in your browser — the preview under the editor is the real result. Nothing is sent to a server. The code runner panel (right) does the same with more room.

Exercise

Which browser versions first shipped WasmGC?