[whatwg] Node inDocument

Jonas Sicking jonas at sicking.cc
Tue Aug 30 01:38:19 PDT 2011

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

More information about the whatwg mailing list