Add console.log shim to avoid errors while deving.

This commit is contained in:
John-David Dalton
2014-08-17 15:39:54 -07:00
parent 34b575da03
commit 9a147218ce

View File

@@ -1,9 +1,12 @@
if (!self.console) {
console = { 'log': function() {} };
}
addEventListener('message', function(e) {
if (e.data) {
try {
importScripts('../' + e.data);
} catch(e) {
self._ = {};
self._ = { 'VERSION': e.message };
}
postMessage(_.VERSION);
}