diff options
Diffstat (limited to 'dom/events/test/error_event_worker.js')
-rw-r--r-- | dom/events/test/error_event_worker.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/events/test/error_event_worker.js b/dom/events/test/error_event_worker.js new file mode 100644 index 0000000000..13422c6974 --- /dev/null +++ b/dom/events/test/error_event_worker.js @@ -0,0 +1,19 @@ +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, + filename, + lineno, + type: "callback", + }; + postMessage(obj); + return false; +}; +throw new Error("workerhello"); |