Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't leak as a global #8

Closed
orls opened this issue Feb 2, 2015 · 0 comments
Closed

Don't leak as a global #8

orls opened this issue Feb 2, 2015 · 0 comments

Comments

@orls
Copy link

orls commented Feb 2, 2015

Quay currently supports loading as an AMD module, but because the code is all in top-level script scope, it's still leaking a global Quay object. You can see this by loading it through requireJS then checking window.Quay.

If you're serious about supporting module loading, you might want to looking into wrapping the whole thing in an IIFE, then doing the define sniff inside that -- for example, following the UMD guidelines

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant