-
Notifications
You must be signed in to change notification settings - Fork 12
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" #5
Comments
There is been quite a motion around it, please check commit history :) Maybe it’s time to create number of wrappers for different use cases. 🤔 |
Sorry, I had in mind different file – https://github.com/form-data/form-data/commits/master/lib/browser.js @DylanPiercey I think we can copy what we have there. |
@alexindigo yeah that should work |
@alexindigo given the goal of this module is to expose Alternatively, again since we are assuming there is already the global, could we not just change this to |
I'm also having the exact same issue, Can't use swagger-js in web worker because of this. I'm also +1 to @DylanPiercey idea exporting directly |
What about using already standardized globalThis? I'll issue a PR if agreed that this is path forward. |
I've issued a PR: #6 for using globalThis object. It's a breaking change but will work in all major browsers and latest node.js versions (and that's what we currently need). |
Could be possible to use self instead of window?
I'm trying to instantiate Swagger in a webworker, and it is complaining because window doesn't exist.
The text was updated successfully, but these errors were encountered: