Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 646 Bytes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<!-- get consoleForWorker -->
<script src="../console4Worker-page.js"></script>
<script language="javascript">
// init the worker
var worker = new Worker("worker.js");
// bind the console4Worker to get console.* from worker
console4Worker.bind(worker);
// example of message handler
worker.addEventListener('message', function(event){
// filter this event if it is from console4Worker
if( console4Worker.filterEvent(event) ) return;
console.log("event non console4Worker", event.data);
}, false);
</script>
</body>
</html>