this._styleNodes = [];
var st, att, cssText, doc = this.domNode.ownerDocument;
var head = doc.getElementsByTagName('head')[0];
for(var i = 0, e = styles.length; i < e; i++){
cssText = styles[i]; att = styles.attributes[i];
st = doc.createElement('style');
st.setAttribute("type", "text/css"); // this is required in CSS spec!for(var x in att){
st.setAttribute(x, att[x])}this._styleNodes.push(st);
head.appendChild(st); // must insert into DOM before setting cssTextif(st.styleSheet){// IE
st.styleSheet.cssText = cssText;
}else{// w3c
st.appendChild(doc.createTextNode(cssText));
}}