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

Simon Pieters <simonp@opera.com> wrote:

> Hi,
> 
> Is it defined what should happen in the following case?

> <div onclick="document.links[0].dispatchEvent(event)">click me</div>
> <a href="http://example.org/">test</a>
> 
> It seems Firefox and Opera throw an exception, while WebKit allows the  
> event to be dispatched.

Yes.  It's quite clearly stated in the documentation for dispatchEvent.

It must be a DISPATCH_REQUEST_ERR exception


-- 
Stewart Brodie
Team Leader - ANT Galio Browser
ANT Software Limited

Received on Thursday, 6 May 2010 09:19:12 UTC