compat.js 770 B

12345678910111213141516171819
  1. // WebAssembly
  2. if (typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function") {
  3. console.debug('Compat: WebAssembly is supported');
  4. } else {
  5. console.error('Compat: WebAssembly is NOT supported');
  6. // Show warning
  7. document.querySelector('.compat.compat-js').style.display = 'inherit';
  8. document.querySelector('.compat.compat-js .wasm').style.display = 'inherit';
  9. }
  10. // TextDecoder
  11. if (typeof TextDecoder !== "undefined") {
  12. console.debug('Compat: TextDecoder is supported');
  13. } else {
  14. console.error('Compat: TextDecoder is NOT supported');
  15. // Show warning
  16. document.querySelector('.compat.compat-js').style.display = 'inherit';
  17. document.querySelector('.compat.compat-js .textdecoder').style.display = 'inherit';
  18. }