lib/stylesheet.js
function Stylesheet() {
  var styleElement = document.createElement('style'),
    head = document.getElementsByTagName('head')[0];

  head.appendChild(styleElement);

  // Safari does not see the new stylesheet unless you append something.
  // However!  IE will blow chunks, so ... filter it thusly:
  if (!window.createPopup) {
    styleElement.appendChild(document.createTextNode(''));
  }

  this.sheet = document.styleSheets[document.styleSheets.length - 1];
}
function Stylesheet() {
  var styleElement = document.createElement('style'),
    head = document.getElementsByTagName('head')[0];

  head.appendChild(styleElement);

  // Safari does not see the new stylesheet unless you append something.
  // However!  IE will blow chunks, so ... filter it thusly:
  if (!window.createPopup) {
    styleElement.appendChild(document.createTextNode(''));
  }

  this.sheet = document.styleSheets[document.styleSheets.length - 1];
}
function Stylesheet ( ) { var styleElement = document . createElement ( 'style' ) , head = document . getElementsByTagName ( 'head' ) [ 0 ] ; head . appendChild ( styleElement ) ; // Safari does not see the new stylesheet unless you append something. // However!  IE will blow chunks, so ... filter it thusly: if ( ! window . createPopup ) { styleElement . appendChild ( document . createTextNode ( '' ) ) ; } this . sheet = document . styleSheets [ document . styleSheets . length - 1 ] ; }
Create a new stylesheet
Create a new stylesheet