W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [cssom-view] new method, like document.elementFromPoint(), but in the document's coordinate space

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Wed, 24 Oct 2012 07:04:20 +0200
Message-ID: <CAERejNZXPfG8Ny5yy3EPS4TO140f9bjC85YkJv0Sg+yYw+i8mw@mail.gmail.com>
To: "Edward O'Connor" <eoconnor@apple.com>
Cc: www-style@w3.org
On Wed, Oct 24, 2012 at 12:33 AM, Edward O'Connor <eoconnor@apple.com> wrote:
> Hi,
> Both document.elementFromPoint() and document.caretPositionFromPoint()
> take viewpoint coordinates, and return null if the coordinates given
> identify a point outside of the visible viewport. This prevents using
> these methods for hit testing elements elsewhere in the document.

How about document.elementsFromPoint(), so you get all elements at
that point sorted descending by z-order?
And wouldn't <element>.caretPositionFromPoint() make more sense? So
you could even get the caret positions from overlapping elements.

Received on Wednesday, 24 October 2012 05:04:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:22 UTC