Skip to content

Encapsulated code #23

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

Closed
michielkouwenhoven opened this issue Jul 31, 2018 · 2 comments
Closed

Encapsulated code #23

michielkouwenhoven opened this issue Jul 31, 2018 · 2 comments

Comments

@michielkouwenhoven
Copy link

michielkouwenhoven commented Jul 31, 2018

It looks like there are three functions exposed to the global namespace (from the minified version).
Is it possible to encapsulate the code and only expose the 'yall' function to the global namespace?

Thanks

@malchata
Copy link
Owner

I certainly think so, and this was something I had been wondering about. I've gone ahead and implemented an encapsulation pattern to contain everything under window.yall. The only drawback is it requires instantiation of the object using the new keyboard, rather than a simple function call, but I think it's a reasonable tradeoff for keeping the window space a bit tidier.

@malchata
Copy link
Owner

Ha! Found a way to do it without introducing a breaking change. When I release the next version, this change will get out there. :)

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants