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: Shane Stephens <shans@google.com>
Date: Mon, 29 Oct 2012 16:21:20 +1100
Message-ID: <CAGTfzwRGexmyAoV50T-rRWY4VMzK5y-WkC8sc2O48Mh3nU-8UQ@mail.gmail.com>
To: Sebastian Zartner <sebastianzartner@gmail.com>
Cc: "Edward O'Connor" <eoconnor@apple.com>, www-style list <www-style@w3.org>
On Fri, Oct 26, 2012 at 5:34 PM, Sebastian Zartner <
sebastianzartner@gmail.com> wrote:

> I don't think it's a good idea to have document.elementFromPoint take
>> viewport coordinates but document.elementsFromPoint take document
>> coordinates.
>>
> Uhm, who said document.elementsFromPoint() would take document
> coordinates? Did you mean <element>.caretPositionFromPoint()? If so, how
> to solve the overlapping problem then?
>

Ted initiated this thread by asking for naming suggestions for a method
similar to document.elementFromPoint that operates with document
coordinates. You replied to this thread...


> Btw. what is caretPositionFromPoint() expected to return? A character
> offset?
>
>
> I think elementsFromPoint isn't a great name
>>
> How about getElementsAtPoint() and getCaretPositionAtPoint() to be
> consistent with similar functions?
>

Maybe it would be better to respond to Ted's requests here, and start a new
thread discussing the possibility of variants of elementFromPoint and
caretPositionFromPoint that return multiple values? Otherwise we risk
confusion, not to mention losing sight of the original request.

Cheers,
    -Shane


>
> Sebastian
>
Received on Monday, 29 October 2012 05:21:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT