diff options
Diffstat (limited to 'js/controllers/styles-controller.js')
-rwxr-xr-x | js/controllers/styles-controller.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 2282794c..64efdb19 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -629,7 +629,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
629 | if(!rule) { | 629 | if(!rule) { |
630 | ///// This should never be hit if providing cssText from existing rule (like those | 630 | ///// This should never be hit if providing cssText from existing rule (like those |
631 | ///// returned from getMatchedCSSRules() | 631 | ///// returned from getMatchedCSSRules() |
632 | //console.warn('StylesController::_getRuleWithCSSText - No rule found with given cssText.'); | 632 | console.warn('StylesController::_getRuleWithCSSText - No rule found with given cssText.'); |
633 | } | 633 | } |
634 | 634 | ||
635 | return rule; | 635 | return rule; |
@@ -647,6 +647,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
647 | doc = element.ownerDocument, | 647 | doc = element.ownerDocument, |
648 | win = doc.defaultView; | 648 | win = doc.defaultView; |
649 | 649 | ||
650 | if(!element.parentNode) { | ||
651 | console.warn('StylesController::getMatchingRules - Un-attached element queried'); | ||
652 | } | ||
653 | |||
650 | try { | 654 | try { |
651 | mappedRules = nj.toArray(win.getMatchedCSSRules(element)).map(function(rule) { | 655 | mappedRules = nj.toArray(win.getMatchedCSSRules(element)).map(function(rule) { |
652 | return this._getRuleWithCSSText(rule.cssText, doc); | 656 | return this._getRuleWithCSSText(rule.cssText, doc); |
@@ -675,7 +679,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
675 | }, this); | 679 | }, this); |
676 | 680 | ||
677 | } catch(ERROR) { | 681 | } catch(ERROR) { |
678 | console.warn('StylesController::getMatchingRules - Un-attached element queried.'); | 682 | console.warn('StylesController::getMatchingRules - getMatchedCSSRules Exception.'); |
679 | } | 683 | } |
680 | ///// Function for sorting by specificity values | 684 | ///// Function for sorting by specificity values |
681 | function sorter(ruleA, ruleB) { | 685 | function sorter(ruleA, ruleB) { |