RE: [DOM3 Events/DOM4] re-dispatching trusted events with initEvent

I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=16847 to track getting DOM3 updated on this point.

Thanks for the info.

BTW: Olli, your email isn't recognized in the Bug DB's CC list. Is there one that will work?

>-----Original Message-----
>From: Olli Pettay [mailto:Olli.Pettay@helsinki.fi]
>Sent: Tuesday, April 24, 2012 12:23 PM
>To: Travis Leithead
>Cc: public-webapps@w3c.org; Anne van Kesteren (annevk@opera.com); Jacob
>Rossi
>Subject: Re: [DOM3 Events/DOM4] re-dispatching trusted events with
>initEvent
>
>On 04/24/2012 09:43 PM, Travis Leithead wrote:
>> Based on my reading of DOM4, initEvent makes it possible to transform
>> a trusted event into a non-trusted event and dispatch it. Is that
>> intentional?
>AFAIK, yes
>
>
>> It is only currently supported in Firefox and Opera. In
>> IE, Chrome and Safari, the initEvent call is ignored in this
>> scenario. After the initEvent call is ignored, Chrome will allow you
>> to dispatch the event (unchanged), IE will not (per the prose
>> currently in DOM3 Events). Note, chrome doesn't report the
>> "isTrusted" property, so I can't tell if initEvent would have set
>> that flag to false (hope so)!
>>
>> I'm trying to rationalize the behavior between DOM3 and DOM4.
>>
>> DOM3 Events was pretty clear that you can't dispatch an event that
>> wasn't created with createEvent.
>Sounds like a bug. That wasn't the intention when isTrusted was added.
>
>> Pretty simple. That's contrary to
>> DOM4 at the moment (which allows it as long as it's been
>> initialized); I wonder if there needs to be another check to prevent
>> re-dispatching a trusted event?. Is there a specific reason for the
>> current behavior?
>>
>> DOM3 Events is not very clear about initEvent at the moment. Should
>> it be allowed to convert a trusted event to a non-trusted event?
>Yes. It should be possible to re-dispatch events. But if a script
>running on a web page dispatches event, the event must become
>untrusted.
>
>
>-Olli
>
>
>> Seems like trouble. Given that IE9 and Chrome/Safari don't allow it,
>> it won't be a compatibility issue to disallow it.
>>
>> Let's come to an agreement on this so that the two specs can be
>> harmonious on this point.
>>
>> -Travis
>>
>>
>
>

Received on Tuesday, 24 April 2012 23:54:38 UTC