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

replace window.load with DOMContentLoaded #3

Merged
merged 1 commit into from Mar 16, 2019

Conversation

Raz0r
Copy link
Contributor

@Raz0r Raz0r commented Feb 21, 2019

Night mode toggle button is rendered only when page is fully loaded because of window.load. WP has lots of scripts that delay page loading. To solve this DOMContentLoaded should be used which is fired when HTML is parsed thus allowing to render the toggle almost immediately.

Night mode toggle button is rendered only when page is fully loaded because of `window.load`. WP has lots of scripts that delay page loading. To solve this `DOMContentLoaded` should be used which is fired when HTML is parsed thus allowing to render the toggle almost immediately.
@markoarula markoarula merged commit 81274d2 into markoarula:master Mar 16, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants