This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dom.spec.whatwg.org/#concept-throw says to create a new DOMException, "set" its name and message to something, and then "throw" it in the WebIDL sense. But WebIDL's throw algorithm http://dev.w3.org/2006/webapi/WebIDL/#es-throwing-exceptions takes the name and message as optional arguments, not an existing exception object. Nothing says what it means to "set" the name and message (own properties? inherited?). I think the DOM algorithm needs to be rewritten to match the WebIDL one, because currently the combination doesn't make sense to me. Maybe you want something like Throw a DOMException, with name equal to name and message equal to an implementation-defined value. But you need to set the code attribute somehow.
Any suggestions heycam?
I extended http://dev.w3.org/2006/webapi/WebIDL/#dfn-throw to take the values to assign to the exception fields, and changed the algorithm in http://dev.w3.org/2006/webapi/WebIDL/#es-throwing-exceptions to set them so. You can then say: Throw a DOMException, with name equal to name, message equal to an implementation-defined value, and with code set to blah.
Thanks! https://github.com/whatwg/dom/commit/9d1febdfc8d10a186387e1081d5810f4de3cba2b