This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
To make DOMException Promises friendly, the DOMException IDL definition needs to extend ES Error. See: https://github.com/domenic/promises-unwrapping/issues/84 Testing the following: <script> try { document.body.appendChild(document.body) } catch (e) { alert(e instanceof Error) } </script> The latest versions of Chrome, Safari, and IE return true. FF returns false.
I think http://heycam.github.io/webidl/#es-exceptions already requires that.
(In reply to Ms2ger from comment #1) > I think http://heycam.github.io/webidl/#es-exceptions already requires that. Why not just make it explicit? It seems we missed this in Gecko ... could it be possible that happened because DOMException does not specify it explicitly?
No, that happened because there was no real spec for this when we implemented DOMException as an interface in 2001.
I'm still not happy that the DOM Spec does not clarify this (or just make it explicit). It should at least contain a note.
It is explicit by not using "interface" but "exception". However, it sounds like what you want is a duplicate of a bug I filed a while ago. *** This bug has been marked as a duplicate of bug 23367 ***