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

[whatwg] Node inDocument

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 30 Aug 2011 12:02:48 +0200
Message-ID: <op.v00t6ypn64w2qv@annevk-macbookpro.local>
On Tue, 30 Aug 2011 11:58:21 +0200, Robin Berjon <robin at berjon.com> wrote:
> But node.ownerDocument.contains(node) isn't. There's no doubt that  
> node.inDocument is less error-prone though.

Depends on the use case. The thread started with "the document" in which  
case you want document.contains().


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 30 August 2011 03:02:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:08 UTC