dist/cssobj.amd.js
function createDOM (rootDoc, id, option) {
  var el = rootDoc.getElementById(id);
  var head = rootDoc.getElementsByTagName('head')[0];
  if(el) {
    if(option.append) return el
    el.parentNode && el.parentNode.removeChild(el);
  }
  el = rootDoc.createElement('style');
  head.appendChild(el);
  el.setAttribute('id', id);
  if (option.attrs)
    for (var i in option.attrs) {
      el.setAttribute(i, option.attrs[i]);
    }
  return el
}
function createDOM (rootDoc, id, option) {
  var el = rootDoc.getElementById(id);
  var head = rootDoc.getElementsByTagName('head')[0];
  if(el) {
    if(option.append) return el
    el.parentNode && el.parentNode.removeChild(el);
  }
  el = rootDoc.createElement('style');
  head.appendChild(el);
  el.setAttribute('id', id);
  if (option.attrs)
    for (var i in option.attrs) {
      el.setAttribute(i, option.attrs[i]);
    }
  return el
}
function createDOM ( rootDoc , id , option ) { var el = rootDoc . getElementById ( id ) ; var head = rootDoc . getElementsByTagName ( 'head' ) [ 0 ] ; if ( el ) { if ( option . append ) return el el . parentNode && el . parentNode . removeChild ( el ) ; } el = rootDoc . createElement ( 'style' ) ; head . appendChild ( el ) ; el . setAttribute ( 'id' , id ) ; if ( option . attrs ) for ( var i in option . attrs ) { el . setAttribute ( i , option . attrs [ i ] ) ; } return el }
plugin for cssobj
plugin for cssobj