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

[whatwg] Node inDocument

From: Erik Arvidsson <arv@chromium.org>
Date: Mon, 29 Aug 2011 17:50:55 -0700
Message-ID: <CAJ8+GoibDekvpLG76MpC6JenDviBKMJobU6tiyqX2pTAP4qhmA@mail.gmail.com>
compareDocumentPosition is a terrible API but I guess there is nothing
preventing implementors to optimize the case where one node is the
document.

erik








On Mon, Aug 29, 2011 at 17:25, Ryosuke Niwa <rniwa at webkit.org> 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.
> - Ryosuke
>
Received on Monday, 29 August 2011 17:50:55 UTC

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