W3C home > Mailing lists > Public > www-style@w3.org > February 2011

[cssom-view] Need a variant of elementFromPoint that returns a NodeList

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 8 Feb 2011 23:22:37 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
cc: www-style@w3.org, esprehn@gmail.com
Message-ID: <Pine.LNX.4.64.1102082242080.28618@ps20323.dreamhostps.com>

elementFromPoint() is defined to return a single Element, but apparently 
it is quite common for users of this API to find that the element at the 
given point isn't the element they want, because multiple elements are 
overlaid on the same spot on the canvas.

It would be useful for such users if a variant of this API could be made 
that returns a (static) NodeList giving all the elements under that point.

(Note that crawling the DOM is not sufficient here, because the overlapped 
nodes are often from very different parts of the DOM, apparently.)

I've cc'ed Elliott, who may be able to provide more information about use 
cases and might be able to show examples of other Wev devs asking for this 
kind of thing.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 8 February 2011 23:23:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT