W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] can a click event be handled on an unbacked hit region()?

From: Edward O'Connor <eoconnor@apple.com>
Date: Wed, 25 Jul 2012 09:30:47 -0700
To: whatwg@lists.whatwg.org
Message-id: <m2629berbc.fsf@eoconnor.apple.com>
Hi Steve,

You wrote:

> From my reading of the hitregion() [1] section of the spec it is
> unclear to me whether click events work on unbacked regions
> It is clear that mouse move events can be used, but will developers be
> able to detect and make use of click events on backed regions?
> My guess is yes, which appears to mean that unbacked regions can be
> used as pseudo interactive controls for mouse or touch events, is that
> correct?

If the hit region has an element in the fallback content as it's
control, click events get forwarded to the relevant fallback element.

If the hit region has an unbacked region description, click events are
fired at the canvas element. In this case, the click event's 'region'
property will contain the ID of the hit region which was clicked.

Look for the spec text beginning with "The MouseEvent interface is
extended to support hit regions."

Received on Wednesday, 25 July 2012 16:31:38 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:43 UTC