Add check for CSS rule type

parent 36b528f5
......@@ -99,6 +99,7 @@ function getStyleValue($$, selector, property) {
sheet = document.styleSheets[styleId];
for (var ruleId = 0; ruleId < sheet.cssRules.length; ruleId++) {
rule = sheet.cssRules[ruleId];
if(rule.type !== CSSRule.STYLE_RULE) continue;
css = rule.cssText;
if (css.indexOf(selector) !== -1) {
if (css.indexOf(property) !== -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment