Re: [dom-events] dispatchEvent()ing a UA-dispatched event

On Thu, 06 May 2010 15:47:35 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 5/6/10 7:16 AM, Simon Pieters wrote:
>> For my use case (making table rows or <canvas> clickable without having
>> to create a new event and copy over all properties manually), maybe we
>> could introduce a cloneEvent API similar to cloneNode? I realize that it
>> is kind of messy to redispatch events, but it would be nice with an easy
>> way to clone an event and dispatch that.
>
> So for <canvas> you can just put it inside an <a>, right?

If you want the whole canvas to be a link, yes. If you want one or several  
areas of the canvas to act as links, then no. I imagined having the links  
as descendants of the canvas and dispatching events at them when getting  
events on the canvas (being careful to not end up in loops with events  
that bubble).


> The real issue is table rows, due to how HTML parsing works?

That's also an issue, yes.

-- 
Simon Pieters
Opera Software

Received on Thursday, 6 May 2010 14:21:57 UTC