See #260 - adds worker error logging.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 31 Oct 2016 20:23:59 +0000 (21:23 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Thu, 3 Nov 2016 19:06:20 +0000 (20:06 +0100)
Why:

* At least there will be some feedback.

docs/js/optimizer.js

index 74cbcbd..0a2349e 100644 (file)
@@ -7,6 +7,9 @@ Optimizer = {
           Optimizer.oncomplete(event.data.id, event.data.output)
       }
     }
+    this.worker.onerror = function (event) {
+      console.error(event)
+    }
   },
 
   process: function (id, styles) {