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

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

From: Simon Fraser <smfr@me.com>
Date: Tue, 08 Feb 2011 15:31:08 -0800
Cc: Anne van Kesteren <annevk@opera.com>, www-style@w3.org, esprehn@gmail.com
Message-id: <3595C4BF-5027-479A-8F5F-62836CBBFD53@me.com>
To: Ian Hickson <ian@hixie.ch>
On Feb 8, 2011, at 3:22 PM, Ian Hickson wrote:

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

I'm glad you said static!

Why would you want to return a node that can never be hit by the user?

If the author wants to make a node invisible to user events, they can use
the pointer-events property.

Received on Tuesday, 8 February 2011 23:31:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC