Velmont/testharness.js — comment on commit f28fc88245aee56f0cbbe3ec9bca22336da9a3d9
File:  line 0
By Ms2ger:

Indeed; that's the way Mozilla did it, at least (https://bugzilla.mozilla.org/show_bug.cgi?id=720208). I don't know about other browsers, but it would seem strange to me to throw different exceptions that essentially are the same thing for different APIs.