Re: Node append

On Sep 20, 2011, at 18:33 , Boris Zbarsky wrote:
> On 9/20/11 10:02 AM, Robin Berjon wrote:
>> On Sep 16, 2011, at 17:13 , Anne van Kesteren wrote:
>>> Maybe instead of a new append() method we could simply make the methods that already accept DocumentFragMent accept arrays too? The arrays would be valid as long as they only contain nodes DocumentFragment can contain or DOMString.
>>> Let me know what you think.
>> I like that plan. DocumentFragment is little more than an array already anyway.
> There are some subtle differences (e.g. a DocumentFragment has a well-defined ownerDocument and generally behaves like a Node and such).

Yes, hence the "little more".

> I can probably live with overloading things like appendChild to take arrays as long as we keep in mind that this will slow down every single appendChild call in the common case of a node being passed.  Presumably we're ok with this, since we're discussing it.

I would assume that it depends on how much of a hit we're talking about.

Robin Berjon - - @robinberjon

Received on Tuesday, 20 September 2011 20:48:57 UTC