W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

Re: Node append

From: Robin Berjon <robin@berjon.com>
Date: Tue, 20 Sep 2011 22:48:24 +0200
Cc: www-dom@w3.org
Message-Id: <B5C39A57-126E-4B04-A6D5-609394BA4AA6@berjon.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
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 - http://berjon.com/ - @robinberjon
Received on Tuesday, 20 September 2011 20:48:57 UTC

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