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

Edward O'Connor eoconnor at apple.com
Wed Jul 25 09:30:47 PDT 2012

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


More information about the whatwg mailing list