Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WasmWebTerm is not a constructor #2

Open
ChrisJefferson opened this issue Oct 10, 2022 · 1 comment
Open

WasmWebTerm is not a constructor #2

ChrisJefferson opened this issue Oct 10, 2022 · 1 comment

Comments

@ChrisJefferson
Copy link

I tried copying the following line from the readme, into my HTML, to pick where binaries are read from:

let wasmterm = new WasmWebTerm("./binaries")

But, I get the output:

Uncaught TypeError: WasmWebTerm is not a constructor
    <anonymous> http://localhost:8080/wasm-webterm.html:16
[wasm-webterm.html:16:28](http://localhost:8080/wasm-webterm.html)
    <anonymous> http://localhost:8080/wasm-webterm.html:16

I'm not a javascript expert, so sorry if this is obvious.

@z11labs
Copy link
Member

z11labs commented Oct 11, 2022

Hi and thank you for trying wasm-webterm :)

Did you load it via script tag or import it as a module? If you loaded it via a script tag directly in your browser (like in Variant 1 of the Usage section in the Readme), it may work to add .default to it:

let wasmterm = new WasmWebTerm.default("./binaries")

Did this work for you? :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants