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

On Fri, Jul 2, 2010 at 3:03 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Jonas Sicking 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:
>>>> 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.
>
> Well let's see: if you want to know what the XHR event flow is, then you
> have to read the XHR specification to see whether it specifies something
> different from the "default" regardless of whether it does or does not.
> If it does specify the event flow, then you are done. And if it does not
> you also have to read the DOM Events specification to learn the default.
> So, correct me if I am wrong, but having to read two specifications does
> not seem to be less work than having to read only one specification.

Like Anne points out, the XHR spec should really not specify the
*event flow*. What it could specify is the propagation path, however I
really don't think we want it to repeat what the DOM Events spec
specifies as far as capturing/target/bubbling phases goes. That should
IMO be defined by the DOM Events spec and the DOM Events spec only.

Because of this, anyone that wants to know which event handlers are
fired when will still have to read the DOM Events spec. Thus it
doesn't seem like a loss of readability to have the DOM Events spec
also define what the default propagation path is.

/ Jonas

Received on Friday, 2 July 2010 18:54:51 UTC