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

[whatwg] Node inDocument

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 30 Aug 2011 03:11:11 +0200
Message-ID: <brdo57d40icl6d8peuaomfs8fiuctkbu5q@hive.bjoern.hoehrmann.de>
* Erik Arvidsson wrote:
>compareDocumentPosition is a terrible API but I guess there is nothing
>preventing implementors to optimize the case where one node is the
>document.

There is a proprietary Element.contains method implemented by some. The
method could be put on the Document interface in which case you could do
`node.ownerDocument.contains(node)` which seems quite fair.
-- 
Bj?rn H?hrmann ? mailto:bjoern at hoehrmann.de ? http://bjoern.hoehrmann.de
Am Badedeich 7 ? Telefon: +49(0)160/4415681 ? http://www.bjoernsworld.de
25899 Dageb?ll ? PGP Pub. KeyID: 0xA4357E78 ? http://www.websitedev.de/ 
Received on Monday, 29 August 2011 18:11:11 UTC

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