2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
6 function errorHandler() {
7 postMessage({ type: "error" });
10 onmessage = function (event) {
11 if (event.data.errors) {
14 postMessage({ type: "ignore", value: b.aaa });
21 postMessage({ type: "ignore", value: a.foo });
24 if (event.data.loop != 0) {
25 var worker = new Worker("errorwarning_worker.js");
26 worker.onerror = errorHandler;
28 loop: event.data.loop - 1,
29 errors: event.data.errors,
32 worker.onmessage = function (e) {
36 postMessage({ type: "finish" });
40 onerror = errorHandler;
41 // eslint-disable-next-line no-self-assign
43 // eslint-disable-next-line no-self-compare
44 if (!onerror || onerror != onerror) {
45 throw "onerror wasn't set properly";