RE: DOM 3 Core: Overlap with JAXP, Document order of attributes, getChildElementsByTagName, Exceptions

Arnold, Curt writes:
 > If you are accessing a COM DOM using JScript (and probably true
 > for other ECMAScript implementations), there is no portable
 > mechanism for determining the DOMException code for the exception.
[...example code...]

  This is an enlightening example!  I must confess I don't know enough
ECMAScript -- I didn't even know it *had* a try/catch construct!  It's
good that it does.

 > However, I'm not saying that that is the right solution, however
 > I do think the problem is legitimate.

  Sounds like it, but...


Jeff Yates writes:
 > If the DOM you are using follows the W3C Recomendation then you use
 > the instanceof operator in JavaScript to find out what exception
 > object was thrown.  After you get that then you use the value of
 > the code property to get the exact error thrown.
 > 
 > If the DOM you are using follows the W3C Recomendation you can use
 > the following:
[...example code...]

  This example seems to indicate that an implementation which follows
the W3C bindings doesn't need any additional functions.  So let's
avoid the extra method.
  Perhaps Curt is using a non-conforming implementation?



-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations

Received on Wednesday, 16 May 2001 09:52:01 UTC