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

bug: Browser examples don't work due to 'Symbol.dispose is not defined' #37

Open
vasilev opened this issue Aug 12, 2024 · 1 comment · May be fixed by #32
Open

bug: Browser examples don't work due to 'Symbol.dispose is not defined' #37

vasilev opened this issue Aug 12, 2024 · 1 comment · May be fixed by #32
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vasilev
Copy link

vasilev commented Aug 12, 2024

Describe the bug
Both browser examples
issue an error message in browser's developer console:

simple.html:

Uncaught TypeError: Symbol.dispose is not defined.
    at pt (quickJS.js:10:40)
    at evalCode (quickJS.js:148:43)
    at simple.html:17:21
(anonymous)	@	simple.html:17

playground.html:

After Run Code button click.

TypeError: Symbol.dispose is not defined.
    at pt (quickJS.js:10:40)
    at evalCode (quickJS.js:148:43)
    at HTMLButtonElement.<anonymous> (playground.html:129:35)
(anonymous)	@	playground.html:132

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo, cd into browser examples folder, start a simple web server:
git clone --depth=1 https://github.com/sebastianwessel/quickjs.git
cd quickjs/example/browser
python3 -m http.server
  1. Point your browser to http://0.0.0.0:8000/simple.html to run the simple.html example.
  2. Point your browser to http://0.0.0.0:8000/playground.html to get the playground's UI, and press "Run Code" button there.

Expected behavior
Expected the examples to work: obtain the meaningfull text output in devconsole or playground's output box.
Expected no errors.

Screenshots
N/A

Desktop (please complete the following information):
Tested in Chromium 124.0.6367 and in Firefox 122.0.1 .

Smartphone (please complete the following information):
N/A

Additional context
N/A

BTW, thank you for this cool library!

@sebastianwessel
Copy link
Owner

Thanks for your feedback.
Yes, it's an already known bug which will be fixed in the upcoming refactored version.

@sebastianwessel sebastianwessel self-assigned this Aug 12, 2024
@sebastianwessel sebastianwessel added the bug Something isn't working label Aug 12, 2024
@sebastianwessel sebastianwessel linked a pull request Aug 12, 2024 that will close this issue
@sebastianwessel sebastianwessel added this to the v2.0 milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants