W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2010

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

From: Simon Pieters <simonp@opera.com>
Date: Thu, 06 May 2010 16:21:16 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: www-dom@w3.org
Message-ID: <op.vcafhqu6idj3kv@simon-pieterss-macbook.local>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT