website icon indicating copy to clipboard operation
website copied to clipboard

Examples failing on Firefox

Open nikolai-b opened this issue 3 years ago • 1 comments

All the examples are failing to load with

Uncaught TypeError: Error resolving module specifier: assemblyscript/asc editor.html:324:20
asm.js type error: Disabled by debugger es-module-shims.js
OK: ^ TypeError module failure has been polyfilled es-module-shims.js:31:106
Uncaught SyntaxError: await is a reserved identifier 294d09ce-3ae3-4a21-b936-02b4331820ed:7:6094
asm.js type error: Disabled by lack of compiler support es-module-shims.js

I'm guessing the relevant code is:

  <!--<script async src="https://cdn.jsdelivr.net/npm/[email protected]/dist/es-module-shims.js"></script>-->
  <script async src="./scripts/es-module-shims.js"></script><!-- TODO: upgrade to 1.5.2 w/ #276-->
  <script type="importmap">
    {
      "imports": {
        "assemblyscript": "https://cdn.jsdelivr.net/npm/assemblyscript/dist/assemblyscript.js",
        "assemblyscript/asc": "https://cdn.jsdelivr.net/npm/assemblyscript/dist/asc.js",
        "binaryen": "https://cdn.jsdelivr.net/npm/[email protected]/index.js",
        "long": "https://cdn.jsdelivr.net/npm/[email protected]/index.js"
      },
      "scopes": {
        "https://cdn.jsdelivr.net/npm/assemblyscript/": {
          "fs": "./scripts/empty.js",
          "module": "./scripts/empty.js",
          "path": "./scripts/empty.js",
          "url": "./scripts/empty.js"
        }
      }
    }
  </script>
  <script type="module">
    import asc from "assemblyscript/asc";

Is the import module shim failing?

I'm on Firefox 78.15.0esr (64-bit)

nikolai-b avatar Mar 25 '22 08:03 nikolai-b

Works in FF 98.0.2. Given

Uncaught SyntaxError: await is a reserved identifier 294d09ce-3ae3-4a21-b936-02b4331820ed:7:6094

could it be that there is no top-level await support in ESR yet? (Latest seems to be 91.7.1esr though)

dcodeIO avatar Mar 25 '22 14:03 dcodeIO