You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How much global namespace pollution is there? The generated JavaScript code is contained in a closure, and this parameter is needed for js.Global to access the right thing.
I've often wished for this, as well. Not becuase pollution is a problem, per se, but because there's no way to know if my global name is used by some other package, so I end up creating global variable names longer than any reasonable person would ever use, just to reduce the chance of collision.
@flimzy Actually that's what I meant by "polluting the global space". Too bad that I haven't get a chance do any GO + JS project for real. So I don't have much input here.
Is it possible to not compile code into
global
but to an object the user can supply?I am imagining something like
So that the importer/user can do
The text was updated successfully, but these errors were encountered: