Re: new DOM4 insertions methods and return values

On 01/16/2013 02:52 AM, Jake Verbaten wrote:
> The older DOM mutation methods like
> Node appendChild(Node node);
> returned the node you inserted
> The newer DOM mutation methods like
> void append((Node or DOMString)... nodes);
> return void instead.
> It would be useful if append returned either the single node or a
> DocumentFragment

The DocumentFragment option seems somewhat difficult to implement; 
wouldn't it require the nodes passed to append() to be children of the 
newly created DocumentFragment, as well as the node append() was called 
on? What should parentNode return on those nodes?


Received on Wednesday, 16 January 2013 09:57:53 UTC