I'm attempting to append CSS styling to the head of a HTML page like so...
var HEAD = document.getElementsByTagName("head")[0];
s = document.createElement('Style');
s.id = 'cssp';
s.type = 'text/css';
s.innerHTML = ecks.cssp;
HEAD.appendChild(s);
However the CSS located in ecks.cssp never appears in the HTML page. What am I doing wrong?
Just an fyi, I'm using chrome to test.
HTMLStyleElement, ecks.cssp is theCSSitself.