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

Web Worker support #35

Open
futurist opened this issue May 28, 2024 · 2 comments
Open

Web Worker support #35

futurist opened this issue May 28, 2024 · 2 comments

Comments

@futurist
Copy link

Want to use this lib in a WebWorker, but there's a line using window object, which is not exists in WebWorker.

@slavslavov
Copy link

I would like to vote for this too. I am trying to use it in QuickJS but have the same issue.

 ./qjs -I msgpack.min.js 
ReferenceError: 'window' is not defined
    at <anonymous> (msgpack.min.js)
    at <eval> (msgpack.min.js)

@ygoe
Copy link
Owner

ygoe commented Oct 6, 2024

I know nothing about web workers, but you might need to adjust the end of the file, where it exports the functions, to your needs. Feel free to create a PR, although I'd need to accept it blindly because I'm not using web workers anywhere.

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

3 participants