-
-
Save shadyonline/94a97c89de4134b33975ea2e87f40dea to your computer and use it in GitHub Desktop.
check if a CSS stylesheet has loaded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var linkEl = document.head.querySelector('link[href*="/styles/index.css"]'); | |
var cssLoaded = Boolean(linkEl.sheet); | |
linkEl.addEventListener('load', function () { | |
cssLoaded = true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment