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

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
z-order.

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
document.getCaretPositionsFromPoint().

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

Sebastian

[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