Skip to content

Commit

Permalink
Some instructional comments for index.worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
senocular authored Sep 30, 2016
1 parent edb2bf7 commit 695d737
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/plot/index.worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
onmessage = function(event) {

// event.data is an object from the community page
// the type property tells you what kind of message is sent

if (event.data.type === 'ping') {

// use postMessage() to send anything you want back
// to the main community page!

postMessage('Pinged: ' + event.data.value);
}
};
};

0 comments on commit 695d737

Please sign in to comment.