OLD | NEW |
---|---|
(Empty) | |
1 var databaseWorker = new Worker('resources/database-worker.js'); | |
2 | |
3 databaseWorker.onmessage = function(event) { | |
4 if (event.data.indexOf('log:') == 0) { | |
5 log(event.data.substring(4)); | |
6 } else if (event.data == 'notifyDone') { | |
7 if (window.layoutTestController) | |
8 layoutTestController.notifyDone(); | |
9 } else { | |
10 throw new Error("Unrecognized message: " + event); | |
11 } | |
12 } | |
13 | |
14 function log(message) | |
15 { | |
16 document.getElementById("console").innerText += message + "\n"; | |
17 } | |
18 | |
OLD | NEW |