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

Replace document.elementFromPoint() and document.caretPositionFromPoint() by functions named like similar functions returning all elements under the given point

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Mon, 29 Oct 2012 07:44:06 +0100
Message-ID: <CAERejNZ2+L=M8Kvna8_JPBjQhY6R_=+auWwuT_VtkbY5ut+wZw@mail.gmail.com>
To: www-style list <www-style@w3.org>
document.elementFromPoint() and document.caretPositionFromPoint() are
defined to use hit testing to return the uppermost element resp. a range
related to it at a specific viewport point[1].
My question is now, what to do when you want to get elements lying under it?
Therefore I suggest that these functions should be replaced by functions
returning all elements under that specific point sorted descending by their

Also their current names don't comply with the naming of similar functions
like document.getElementsByName().
So I'd say they should be renamed to document.getElementsFromPoint() and

For reference: I already mentioned these points in another thread[2][3].


[1] http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface
[2] http://lists.w3.org/Archives/Public/www-style/2012Oct/0702.html
[3] http://lists.w3.org/Archives/Public/www-style/2012Oct/0757.html
Received on Monday, 29 October 2012 06:50:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:35:17 UTC