adding DocumentFragment to a Node

I have an implementation question about inserting a DocumentFragment Node 
into another Node.

My apologies if this has been discussed before.

I do not know what to return as the value for the methods which insert 
Nodes when the Node being added is a DocumentFragment. The 
DocumentFragment is not added into the Node, its content is. That content 
can be multiple Nodes at the "root" level of the DocumentFragment.

The return value should be the Node added. Since, after being inserted 
into another Node the DocumentFragment no longer exists, what is 
returned? 

From the description of Node.insertBefore in the DOM spec:

"If newChild is a DocumentFragment object, the entire contents of the 
document
fragment are moved into the child list of this node."

and later:

"Return Values
     The node being inserted."

Thanks,

Deke



-----------------------------------------------------------------
Deke Smith
Tallent Communications Group, Brentwood TN
deke@tallent.com, 615-661-9878
-----------------------------------------------------------------
" The best way to predict the future is to invent it. " 
       - Alan Kay 

Received on Tuesday, 3 November 1998 16:26:18 UTC