JSFiddle - React, Tailwind, and code Playground
by mkdizajn
JavaScript
var ss = document.createElement( "style" ),
head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
css = '@font-face {font-family: "TEST"; src: url("test.eot") format("eot");}';
ss.type = "text/css";
if ( ss.styleSheet ){
ss.styleSheet.cssText = css;
}
else {
ss.appendChild( document.createTextNode( css ) );
}
head.insertBefore(ss, head.firstChild );