-
Notifications
You must be signed in to change notification settings - Fork 17k
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
IIFE in classlist_polyfills.js #352
Comments
Wikipedia explains it: |
Okay so going through what you suggested I guess other polyfills would be invoked as and when it's required according to the functionality and execution of the game. We don't want them to be executed pre-maturely. But classlist_polyfills.js interacts with the HTML and CSS required for the game's appearance which anyway needs to be loaded at the very beginning of the game every time the index.HTML page is opened in a browser. So making them an IIFE is justified. |
No. Read here about polyfills: https://en.wikipedia.org/wiki/Polyfill
Main use for IIFE is to declare a scope. |
Sir, my question would be as to why we used IIFE in classlist_polyfills.js whereas it has not been used in the other polyfills classes? As in, what exactly is special about this polyfills that separates it from the other polyfills?
The second part of the question would be, how is it actually testing the existence of the functionality which is the first step in polyfills writing?
Although it might not exactly be an issue, I would be eagerly waiting for a clarification.
The text was updated successfully, but these errors were encountered: