summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/support/ErrorEvent.js
blob: 22ea6d4fb51598bea91c798c8c4442f0cc018f96 (plain)
1
2
3
4
5
6
7
8
9
10
onmessage = function(evt)
{
    throw(new Error(evt.data));
}

onerror = function(message, location, line, col)
{
    postMessage( {"message": message, "filename": location, "lineno": line, "colno": col} );
    return false; // "not handled" so the error propagates up to the Worker object
}