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

index 43d9f34..4c63023 100644 (file)
@@ -7,7 +7,7 @@ function(){
         return b.toUpperCase();
     }
     
-    var fetchStyle = function(dom)
+    var fill = function(dom)
     {
         var style;
         var returns = {};
@@ -22,6 +22,12 @@ function(){
         }
         //return returns;
     }
+    var el = document.querySelector('body');
+    fillStyle(el);
+    var matches = el.querySelectorAll('*');
+    for(var i =0;i < matches.length;i++) {
+        fillStyle(matches[i]);
+    }