cacheStyleSheet : function(V){
- if(!S){
- S = {};
+ if(!A){
+ A = {};
}
try{
var ssRules = V.cssRules || V.rules;
for(var j = ssRules.length-1; j >= 0; --j){
- S[ssRules[j].selectorText] = ssRules[j];
+ A[ssRules[j].selectorText] = ssRules[j];
}
}catch(e){}
},
getRules : function(W){
- if(S == null || W){
- S = {};
+ if(A == null || W){
+ A = {};
var ds = B.styleSheets;
for(var i =0, len = ds.length; i < len; i++){
try{
}catch(e){}
}
}
- return S;
+ return A;
},
createStyleSheet : function(cssText, id){
var ss;
var head = doc.getElementsByTagName("head")[0];
- var rules = doc.createElement("style");
- rules.setAttribute("type", "text/css");
+ var nrules = doc.createElement("style");
+ nrules.setAttribute("type", "text/css");
if(id){
- rules.setAttribute("id", id);
+ nrules.setAttribute("id", id);
}
if (typeof(cssText) != 'string') {
// support object maps..
if(Roo.isIE){
- head.appendChild(rules);
- ss = rules.styleSheet;
+ head.appendChild(nrules);
+ ss = nrules.styleSheet;
ss.cssText = cssText;
}else{
try{
- rules.appendChild(doc.createTextNode(cssText));
+ nrules.appendChild(doc.createTextNode(cssText));
}catch(e){
- rules.cssText = cssText;
+ nrules.cssText = cssText;
}
- head.appendChild(rules);
- ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
+ head.appendChild(nrules);
+ ss = nrules.styleSheet ? nrules.styleSheet : (nrules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
}
this.cacheStyleSheet(ss);
return ss;
cacheStyleSheet : function(V){
- if(!S){
- S = {};
+ if(!A){
+ A = {};
}
try{
var ssRules = V.cssRules || V.rules;
for(var j = ssRules.length-1; j >= 0; --j){
- S[ssRules[j].selectorText] = ssRules[j];
+ A[ssRules[j].selectorText] = ssRules[j];
}
}catch(e){}
},
getRules : function(W){
- if(S == null || W){
- S = {};
+ if(A == null || W){
+ A = {};
var ds = B.styleSheets;
for(var i =0, len = ds.length; i < len; i++){
try{
}catch(e){}
}
}
- return S;
+ return A;
},
createStyleSheet : function(cssText, id){
var ss;
var head = doc.getElementsByTagName("head")[0];
- var rules = doc.createElement("style");
- rules.setAttribute("type", "text/css");
+ var nrules = doc.createElement("style");
+ nrules.setAttribute("type", "text/css");
if(id){
- rules.setAttribute("id", id);
+ nrules.setAttribute("id", id);
}
if (typeof(cssText) != 'string') {
// support object maps..
if(Roo.isIE){
- head.appendChild(rules);
- ss = rules.styleSheet;
+ head.appendChild(nrules);
+ ss = nrules.styleSheet;
ss.cssText = cssText;
}else{
try{
- rules.appendChild(doc.createTextNode(cssText));
+ nrules.appendChild(doc.createTextNode(cssText));
}catch(e){
- rules.cssText = cssText;
+ nrules.cssText = cssText;
}
- head.appendChild(rules);
- ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
+ head.appendChild(nrules);
+ ss = nrules.styleSheet ? nrules.styleSheet : (nrules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
}
this.cacheStyleSheet(ss);
return ss;