summaryrefslogtreecommitdiffstats
path: root/dom/events/test/error_event_worker.js
blob: 9f6e0e4bd266ab8dbcd3cf49964aca86f9c382b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 addEventListener("error", function(e) {
     var obj = {};
     for (var prop of ["message", "filename", "lineno"]) {
       obj[prop] = e[prop]
     }
     obj.type = "event";
     postMessage(obj);
});
onerror = function(message, filename, lineno) {
  var obj = { message: message, filename: filename, lineno: lineno,
	      type: "callback" }
  postMessage(obj);
  return false;
}
throw new Error("workerhello");