inliner.js
authorAlan Knowles <alan@roojs.com>
Thu, 12 Nov 2015 05:44:27 +0000 (13:44 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 12 Nov 2015 05:44:27 +0000 (13:44 +0800)
inliner.js

index f2b4896..dfee844 100644 (file)
         }
         var pstyle = false;
          if (dom.nodeName != 'BODY') {
-            pstyle = window.getComputedStyle(dom.parentNode, null);
+            pstyle = window.getComputedStyle(dom.parentElement, null);
          
         }
-        var style = window.getComputedStyle(dom, null);
-        
+         
         
         for(var i=0;i<keys.length;i++){
             var prop = keys[i];
@@ -50,7 +49,7 @@
             //returns[camel] = val;
             
             // idea... if the parent has the same style.. then do not apply it to the child?
-            if (dom.nodeName != 'BODY' && dom.parentNode.style[prop] == val) {
+            if (pstyle && pstyle[prop] == val) {
                 continue;
             }