Skip to content
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

classList.js does not work if loaded after DOMContentLoaded #68

Open
tmb-github opened this issue Jun 14, 2017 · 1 comment
Open

classList.js does not work if loaded after DOMContentLoaded #68

tmb-github opened this issue Jun 14, 2017 · 1 comment

Comments

@tmb-github
Copy link

I defer all of my JavaScript until after DOMContentLoaded. The classList.js polyfill is not accessible unless it is loaded at or before document.readyState === "loading". How can this be overcome?

@englishextra
Copy link

englishextra commented Jun 14, 2017

you can do smth like this at the bottom of the body of your page:

loadJS("./polyfills.js",loadJS("./bundle.js"));

see here

DOMContentLoaded is tricky:
see here

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

No branches or pull requests

2 participants