W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Node inDocument

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 30 Aug 2011 01:38:19 -0700
Message-ID: <CA+c2ei9ZqMzrLvAqK3QbQ4++rrV-8XxL7hyjEsYuKbBRanO8aA@mail.gmail.com>
On Mon, Aug 29, 2011 at 11:32 PM, Anne van Kesteren <annevk at opera.com> wrote:
> On Tue, 30 Aug 2011 03:49:48 +0200, Erik Arvidsson <arv at chromium.org> wrote:
>> Node inDocument seems cleaner but I'd be happy with contains moved to
>> Node so that Document could optimize this.
> The DOM is discussed on www-dom at w3.org. This particular issue is
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=13464 at the moment. I would
> be fine with adding contains() on Node if most implementors think that is a
> good idea.

In general I think it's better to have functions that deal with child
lists on Node rather than on Element/Document/DocumentFragment.

I think it might still make sense to have inDocument though. That'll
allow people to more clearly express what they are actually trying to
do, while allowing implementations to write faster code.

/ Jonas
Received on Tuesday, 30 August 2011 01:38:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC