MaxGraey / wasm-check

TypeScript / JavaScript library for detect WebAssembly features in node.js & browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable wasm on firefox

tudor-phd opened this issue · comments

Hi,

Issue description:

If I go on Firefox and open about:config ; search for javascript.options.wasm and set it to false, the package will throw an error

Steps to reproduce the issue:

  1. Open Firefox
  2. Open about:config
  3. Search by javascript.options.wasm
  4. Set the value to false
  5. Open an app where you added wasm-check package

What's the expected result?
Catch the case when the wasm is disabled.

What's the actual result?
App crashes with error: Uncaught ReferenceError: WebAssembly is not defined

Additional details / screenshot:
Screenshot 2021-03-29 at 12 07 03
Screenshot 2021-03-30 at 15 47 38

Oh, what? I didn't know browser can disable WebAssembly completely!
Thanks for report!

On 2.0.3 I'm still getting this error @MaxGraey

To reproduce you can follow steps from the original issue and visit this codesandbox:
https://codesandbox.io/s/hardcore-star-20fy3h?file=/src/index.js

Preview:
image