Re: parentNode

The boundary between architecture and implementation seems to be just a
trifle fuzzy here.

     [In short, by insisting that DOM implementers always have a
     DocumentFragment associated with a Node or subtree that has not yet
     been put in a tree or has been cut out of a tree, we make it easier
     for users to track and manipulate those nodes.]

The scratchpad argument isn't all that strong -- those who want a
scratchpad are always free to create one before they start adding nodes to
it.

The argument about tying the node (indirectly) to a particular Document is
somewhat better, though once could argue that "because some now do it, all
must do it" probably isn't the Right Thing and it could/should be left as
an implementation detail.

An argument about going one step further, putting the node in the context
of a particular DocumentType (which will eventually define/constrain what
its attributes and children may be), might be strongest. Though one could
still argue that an "unattached" node could be created without checking,
and then validated when it is actually being placed into the context of a
particular document.


Question: Will there be a way to ask whether a Node is in fact attached
only to a/the default DocumentFragment?

Received on Tuesday, 28 July 1998 17:47:44 UTC