Re: Which exception to throw when multiple apply?

* Cameron McCormack wrote:
>It doesn’t seem to be specified in DOM 3 Core what exception code should
>be used when the DOMException is thrown for this document:
>
>  <html>
>  <head><title>insertBefore test</title></head>
>  <body>
>  <div id='d1'><div id='d2'></div></div>
>  <script>
>    d1 = document.getElementById('d1');
>    d2 = d1.firstChild;
>    d2.insertBefore(d1, document.documentElement);
>  </script>
>  </body>
>  </html>
>
>Both HIERARCHY_REQUEST_ERR and NOT_FOUND_ERR are applicable.
>
>Is it worth specifying?

I do not think it is likely that applications incorrectly trigger either
of the exceptions and at the same time depend on the precise error code.
I do not think we should make some DOM implemenentations non-conforming
without a very good reason to do it. So, no.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 30 April 2007 10:50:44 UTC