W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

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

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Tue, 24 Apr 2012 23:54:04 +0000
To: "olli@pettay.fi" <olli@pettay.fi>
CC: "public-webapps@w3c.org" <public-webapps@w3c.org>, "Anne van Kesteren (annevk@opera.com)" <annevk@opera.com>, Jacob Rossi <Jacob.Rossi@microsoft.com>
Message-ID: <9768D477C67135458BF978A45BCF9B383830B2A4@TK5EX14MBXW602.wingroup.windeploy.ntdev.microsoft.com>
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
>Subject: Re: [DOM3 Events/DOM4] re-dispatching trusted events with
>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
>> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:33 UTC