W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2006

Re: Is appendChild/insertBefore() supposed to raise exceptions for attributes?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 22 Dec 2006 13:38:11 +0100
To: Frans Englich <frans.englich@telia.com>
Cc: www-dom@w3.org
Message-ID: <m9kno2dimv8n7lli0a7m1k6qt5eig7kdej@hive.bjoern.hoehrmann.de>

* Frans Englich wrote:
>* "they are not actually child nodes of the element" but 
>Node.appendChild(attr) is nevertheless supposed to work. However, it doesn't 
>populate childNodes(), but instead adds the attribute to the imaginary 
>Node.attributes() list.

I don't think this would be a reasonable reading of the specification,
it says "Adds the node newChild to the end of the list of children of
this node" and your operation would not do that. Further, you get an
exception if the node "is of a type that does not allow children of the
type of the newChild node".
-- 
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 Friday, 22 December 2006 12:38:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT