-
Notifications
You must be signed in to change notification settings - Fork 2k
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
non-standard globals #341
Comments
FWIW use of browserify ala #326 would solve this issue in its entirety as there would be no need to leak anything but |
Only a few of these are actually leaks (Inspector, sinspect, shadowize, and polymerWrapper_). On top of that, JsMutationObserver can probably be eliminated. The rest are standalone entities and not leaks. It's not crazy to consider putting them under an umbrella namespace, but that would be a coordination of peers. Fwiw, Polymer is another global that's not in your list. |
Yep, I'm only looking at the platform at the moment. My mental model for the platform was that it was just polyfills, which is why I was surprised all this other non-standard stuff was appearing.
Are these entities 'standards' though? If not, they should belong in an umbrella namespace. If I pull in a browser library, I expect it to produce at most a single global, otherwise I've got no control over what's going on my environment. I'll see what can be done and will try come up with some PRs. |
Although the details have changed, we still need a sweep of all the modules to make sure we are only creating intentional, documented globals . |
Closing this issue due to age and the release of version 1 of Polymer - please feel free to re-open if this is incorrect. |
Polymer is leaking a lot of random stuff into the global namespace. Is there a potential strategy/policy that could be adopted to prevent creation of any non-standard globals other than the absolute bare minimum (e.g. nest everything custom under
window.Platform
)?At time of writing, the polymer-platform leaks the following globals. I have taken a stab at which of these are standard, which are non-standard.
Potentially standard
Potentially non-standard, consider removing:
There's probably even more globals in the full polymer project.
The text was updated successfully, but these errors were encountered: