title: Modifying the innerHTML of a <style> element in IE8
body: <p>I am creating a style element and I need to put some CSS into it. The below code works in Chrome, Safari and FF, but fails in IE8:</p>
  
  <pre><code>var styleElement = document.createElement("style");
  
  styleElement.type = "text/css";
  
  styleElement.innerHTML = "body{background:red}";
  
  document.head.appendChild(styleElement);
  </code></pre>
  
  <p>In IE8, the code fails when it comes to the innerHTML part. I've tried doing:</p>
  
  <pre><code>var inner = document.createTextNode("body{background:red}");
  
  styleElement.appendChild(inner);
  </code></pre>
  
  <p>But this also fails with "Unexpected call to method or property access."
  I'm looking for a workaround or fix.</p>