RE: Custom DOM events and privileged browser add-ons; Was: Bubbling/Capturing for XHR + other non-DOM objects

Jonas Sicking [mailto:jonas@sicking.cc] wrote:
>On Fri, Jul 2, 2010 at 1:29 AM, Anne van Kesteren <annevk@opera.com> wrote:
>> On Wed, 30 Jun 2010 22:39:48 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>> On 6/29/10 2:36 PM, Chris Wilson wrote:
>>>> See, this is exactly why we asked the question - because it seems 
>>>> that behavior is inconsistent, we're not sure what the expectation is.
>>>
>>> I think Anne answered the question, in any case: the XHR event target 
>>> chain only contains the XHR object itself and nothing else.  If the 
>>> spec doesn't say that explicitly, it should.
>>
>> I do not think the XMLHttpRequest specification should state that to 
>> be honest. If that is at all unclear from the current specifications 
>> (and I am not particularly convinced) that should be clarified in DOM 
>> Events. There are plenty of objects around that implement EventTarget. 
>> Saying for every single one of them they are standalone is make work.
>
>Indeed. Seems like having the DOM Events spec say that EventTargets are standalone unless otherwise specified seems like a good idea.

...and that's precisely what I was getting at, and why I asked what some appeared to take as an obvious question.  It would be a good idea, imo, to establish the pattern: that events on non-DOM objects do not (unless they explicitly say so) get capturing/bubbling behavior.  The place to do that would seem to be the DOM Events spec.

BTW, the XHR spec does not say anything about capture, iirc, just bubbling - leaving it somewhat ambiguous.

Thanks,
-Chris

Received on Friday, 2 July 2010 16:22:09 UTC