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

[whatwg] Node inDocument

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 30 Aug 2011 02:55:24 +0200
Message-ID: <1vbo57h9dhj0o07js0gpf24fcbhe5ncuol@hive.bjoern.hoehrmann.de>
* Ryosuke Niwa wrote:
>On Mon, Aug 29, 2011 at 5:21 PM, Bjoern Hoehrmann <derhoermi at gmx.net> wrote:
>>
>> This is addressed by Node.compareDocumentPosition. Have you missed this
>> or is there some problem making that perform properly?
>
>Node.compareDocumentPosition is O(n) when both node are in the same
>document.

A node's owner document node does not contain itself, so this is not a
problem in this case as you want the position relative to the document.
-- 
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 17:55:24 UTC

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