Created
April 2, 2017 06:06
-
-
Save jssee/8b37535359c4af2513b9e2b221b28d29 to your computer and use it in GitHub Desktop.
Preload following stylesheet
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
const link = document.querySelector("a"); | |
link.addEventListener("mouseenter", () => { | |
const css = "<link rel=preload as=style href=contact.css>"; | |
document.head.insertAdjacentHTML("beforeend", css); | |
},{ | |
once:true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment