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

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 UTC