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 workers #11

Closed
calvinmetcalf opened this issue Jan 28, 2015 · 2 comments

Comments

@calvinmetcalf
Copy link

commented Jan 28, 2015

the global variable in a web worker is named self, so renaming this to self in a worker can be tricky if you then need to grab a reference to the global, does this assume it's always in a browserify context?

@feross

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

For web workers, I would just add this to the top of the file:

/* global self */

I'm hesitant to do this by default because then we lose the protection of checking for accidental use of window.self when people accidentally forget var self = this in a method.

@feross

This comment has been minimized.

Copy link
Member

commented Jan 30, 2015

Closing this now, since adding a comment is a pretty nice solution :)

@feross feross closed this Jan 30, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.