use of SyntaxError DOMException

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