W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Proposal: creation methods also at element nodes

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Sun, 24 Feb 2002 06:14:47 -0500 (EST)
To: www-dom@w3.org
Message-ID: <18636.1014549240@www39.gmx.net>
Dear all!

I propose to have the creation methods "createElement", "createElementNS",
"createAttribute", and "createAttributeNS" also at element nodes (and not only
at document nodes).

The advantage is that depending on the element for which a sub-element or
attribute is created different classes may be instantiated. Implementations
that instantiate always the same classes may delegate the creation to their
owner document.

I use such specialized element and attribute classes to include processing
logic in the DOM.

A consequence would be that such specialized nodes may not be moved freely
in the DOM. A HIERARCHY_REQUEST_ERROR must be raised if they are to be added
to an improper element.

Thanks for your attention,
Received on Monday, 25 February 2002 12:52:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:09 UTC