Last active
March 15, 2018 13:55
-
-
Save Mehmet-Erkan/985e7c002ca2bd384191fb0041bd15f3 to your computer and use it in GitHub Desktop.
CSS JSLink
This file contains 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
function ensureCssRegistered(id, url) { | |
var cssId = id; | |
if (!document.getElementById(cssId)) { | |
var head = document.getElementsByTagName('head')[0]; | |
var link = document.createElement('link'); | |
link.id = cssId; | |
link.rel = 'stylesheet'; | |
link.type = 'text/css'; | |
link.href = url; | |
link.media = 'all'; | |
head.appendChild(link); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment