3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/shared.js"></script>
9 worker = startWorker('resources/transaction-complete-workers.js');
11 // FIXME: It should be possible for the worker to set self.onerror to catch the event
12 // and call event.preventDefault(), but in the current Worker implementation the raw
13 // exception is seen by the event handler in the worker, not an ErrorEvent object.
15 var orig_onerror = worker.onerror;
16 worker.onerror = function (event) {
17 if (event.message === "Uncaught Error: ignore this" || event.message === "Error: ignore this") {
18 debug("Got expected error from worker, ignoring");
19 evalAndLog("event.preventDefault()");
20 } else if (orig_onerror) {