export default function loadCss(id: string, loc: string) { if (!document.getElementById(id)) { var head = document.getElementsByTagName("head")[0]; var link = document.createElement("link"); link.id = id; link.rel = "stylesheet"; link.type = "text/css"; link.href = loc; link.media = "all"; head.appendChild(link); } }