Source code
Revision control
Copy as Markdown
Other Tools
onmessage = function (event) {
if (event.data != 0) {
var worker = new Worker("websocket_loadgroup_worker.js");
worker.onmessage = function (e) {
postMessage(e.data);
};
worker.postMessage(event.data - 1);
return;
}
var ws = new WebSocket(
);
ws.onopen = function () {
postMessage("opened");
};
ws.onclose = function () {
postMessage("closed");
};
ws.onerror = function () {
postMessage("error");
};
};