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

Use self instead of window to support Web Workers #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trentmwillis
Copy link

Thanks for this library! I'd like to use it for a project that is using Web Workers. However, currently, it throws an error when it is loaded due to a reference to window, which isn't available in a Web Worker. Replacing this with self, which is available in both the main browser thread and Web Workers, fixes the issue and the library works perfectly!

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

Successfully merging this pull request may close these issues.

1 participant