[whatwg] Node inDocument

Anne van Kesteren annevk at opera.com
Tue Aug 30 03:02:48 PDT 2011


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/



More information about the whatwg mailing list