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:00:38 -0700
Message-ID: <CAJ8+GoiH5KiEBDvi7ejiamSqZGxKGS3U5h=4M332N+ibeXJLeA@mail.gmail.com>
As we were looking at mutation events we realized that we would like
to expose whether a Node is in the document or not. Both WebKit and
Gecko have an O(1) way of determine this. Today, to do this in script
this is O(depth) which is clearly sub optimal.

We are therefore suggesting adding the following to Node idl:

readonly attribute boolean inDocument;

Has this been covered before? Is there a reason why we would not want
to do this?

Received on Monday, 29 August 2011 17:00:38 UTC

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