Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81152 views
1
/* jshint worker: true */
2
"use strict";
3
4
if (typeof console == 'undefined') {
5
this.console = {
6
error: function(e){
7
postMessage(JSON.stringify({
8
type: 'error',
9
message: e.message,
10
stack: e.stack
11
}));
12
},
13
log: function(message){
14
postMessage(JSON.stringify({
15
type: 'log',
16
message: message
17
}));
18
}
19
}
20
}
21
22
console.log('worker BEGIN');
23
24
// The UMD wrapper tries to store on `global` if `window` isn't available
25
var global = {};
26
importScripts("phantomjs-shims.js");
27
28
try {
29
importScripts("../../build/react.js");
30
} catch (e) {
31
console.error(e);
32
}
33
34
postMessage(JSON.stringify({
35
type: 'done'
36
}));
37
38
console.log('worker END');
39
40