- From: Cameron McCormack <cam@mcc.id.au>
- Date: Fri, 27 Apr 2012 09:49:20 +1000
- To: "www-dom@w3.org" <www-dom@w3.org>
The DOM spec defines exception types for each of the DOMException codes. One of them is "SyntaxError", which corresponds to the SYNTAX_ERR code. But we also have the built-in SyntaxError exception, the one whose instances have [[Prototype]] == SyntaxError.prototype. (It would be nice if we could merge these somehow, but I think that would be difficult, since we can't have some DOMExceptions inheriting from SyntaxError.prototype and others from Error.prototype.) If they do remain separate, then should new specs that are throwing an exception due to a syntax error prefer to throw the "SyntaxError" DOMException or the built-in SyntaxError? I think I have a slight preference for the built-in one, just so we can avoid code properties in a few more places.
Received on Thursday, 26 April 2012 23:49:51 UTC