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

* 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 UTC