[whatwg] Node inDocument

Anne van Kesteren annevk at opera.com
Tue Aug 30 01:44:08 PDT 2011

On Tue, 30 Aug 2011 10:38:19 +0200, Jonas Sicking <jonas at sicking.cc> wrote:
> 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.

If we are going to have Node.contains implementations surely could  
optimize document.contains(node) which seems as clear as node.inDocument  
to me.

Anne van Kesteren

More information about the whatwg mailing list