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

2012-04-24 Thread Olli Pettay
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

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

2012-04-24 Thread Glenn Maynard
On Tue, Apr 24, 2012 at 2:23 PM, Olli Pettay olli.pet...@helsinki.fiwrote: 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. What's the point of isTrusted, anyway? You have to trust other scripts

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

2012-04-24 Thread Travis Leithead
...@w3c.org; Anne van Kesteren (ann...@opera.com); Jacob Rossi Subject: Re: [DOM3 Events/DOM4] re-dispatching trusted events with initEvent On Tue, Apr 24, 2012 at 2:23 PM, Olli Pettay olli.pet...@helsinki.fimailto:olli.pet...@helsinki.fi wrote: Yes. It should be possible to re-dispatch events

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

2012-04-24 Thread Glenn Maynard
On Tue, Apr 24, 2012 at 2:54 PM, Travis Leithead travis.leith...@microsoft.com wrote: Glenn, isTrusted is the indicator that helps the web developer distinguish between an event fired by the UA, or one fired by JavaScript (e.g., dispatchEvent). I know what it does; I'm asking what its

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

2012-04-24 Thread Tobie Langel
On 4/24/12 9:54 PM, Travis Leithead travis.leith...@microsoft.com wrote: Glenn, isTrusted is the indicator that helps the web developer distinguish between an event fired by the UA, or one fired by JavaScript (e.g., dispatchEvent). From: Glenn Maynard [mailto:gl...@zewt.org] What's the

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

2012-04-24 Thread Tobie Langel
On 4/24/12 10:00 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 24, 2012 at 2:54 PM, Travis Leithead travis.leith...@microsoft.com wrote: Glenn, isTrusted is the indicator that helps the web developer distinguish between an event fired by the UA, or one fired by JavaScript (e.g.,

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

2012-04-24 Thread Glenn Maynard
On Tue, Apr 24, 2012 at 3:06 PM, Tobie Langel to...@fb.com wrote: Are you asking about the purpose of exposing the property or the purpose of trusted events? I'm asking about the property. The flag underneath it exists only to implement the property. The latter's obvious: prevent visited

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

2012-04-24 Thread Glenn Maynard
(Sorry, forgot to merge drafts.) On Tue, Apr 24, 2012 at 3:02 PM, Tobie Langel to...@fb.com wrote: See http://www.w3.org/TR/DOM-Level-3-Events/#events-event-type-isTrusted Please don't link people to TR specs; that text is almost a year out of date, which invites pain and confusion. Always

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

2012-04-24 Thread Anne van Kesteren
On Tue, 24 Apr 2012 22:00:24 +0200, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 24, 2012 at 2:54 PM, Travis Leithead travis.leith...@microsoft.com wrote: Glenn, isTrusted is the indicator that helps the web developer distinguish between an event fired by the UA, or one fired by JavaScript

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

2012-04-24 Thread Boris Zbarsky
On 4/24/12 4:34 PM, Glenn Maynard wrote: This is a common misconception of how events work. If you're a browser, default events do not--except for one or two web-compat exceptions--look like this: browse_button.addEventListener(click, function(e) { if(e.isTrusted) openFilePicker(); }, false);

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

2012-04-24 Thread Tobie Langel
On 4/24/12 11:04 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 4/24/12 5:02 PM, Boris Zbarsky wrote: Oh, and that's before we get into default actions implemented by extensions. And one more thing: extensions _definitely_ want to know whether events are trusted or not. This doesn't necessitate

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

2012-04-24 Thread Boris Zbarsky
On 4/24/12 5:08 PM, Tobie Langel wrote: On 4/24/12 11:04 PM, Boris Zbarskybzbar...@mit.edu wrote: On 4/24/12 5:02 PM, Boris Zbarsky wrote: Oh, and that's before we get into default actions implemented by extensions. And one more thing: extensions _definitely_ want to know whether events

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

2012-04-24 Thread Anne van Kesteren
On Tue, 24 Apr 2012 23:02:22 +0200, Boris Zbarsky bzbar...@mit.edu wrote: (DOM3's language about default actions confuses this; I suggest reading DOM4's event section to get a good picture of how this actually works.) Or rather how the DOM4 editor is choosing to conceptualize it, which may

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

2012-04-24 Thread Boris Zbarsky
On 4/24/12 5:16 PM, Anne van Kesteren wrote: On Tue, 24 Apr 2012 23:02:22 +0200, Boris Zbarsky bzbar...@mit.edu wrote: (DOM3's language about default actions confuses this; I suggest reading DOM4's event section to get a good picture of how this actually works.) Or rather how the DOM4 editor

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

2012-04-24 Thread Travis Leithead
...@helsinki.fi] Sent: Tuesday, April 24, 2012 12:23 PM To: Travis Leithead Cc: public-weba...@w3c.org; Anne van Kesteren (ann...@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

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

2012-04-24 Thread Olli Pettay
On 04/25/2012 12:16 AM, Anne van Kesteren wrote: On Tue, 24 Apr 2012 23:02:22 +0200, Boris Zbarsky bzbar...@mit.edu wrote: (DOM3's language about default actions confuses this; I suggest reading DOM4's event section to get a good picture of how this actually works.) Or rather how the DOM4