W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2010

Re: addEventListener with useCapture = true triggered by target phase event?

From: Doug Schepers <schepers@w3.org>
Date: Wed, 14 Apr 2010 11:16:13 -0400
Message-ID: <4BC5DC3D.8080103@w3.org>
To: ATSUSHI TAKAYAMA <taka.atsushi@googlemail.com>
CC: www-dom@w3.org
Hi, Takayama-san-

I simply hadn't gotten to it yet, but thanks for the feedback and the 
reminder.  The newest draft should reflect your suggested changes.  Let 
me know if anything seems amiss.

If you have any tests for this, they would be appreciated.

-Doug Schepers
W3C Team Contact, SVG and WebApps WGs

ATSUSHI TAKAYAMA wrote (on 4/14/10 3:50 AM):
> Hi Doug,
> I'm wondering whether this topic has been forgotten, as there has been
> no discussion for two months nor been reflected to the latest draft.
> http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
> Chapter 4.3
> On Tue, Feb 23, 2010 at 7:39 AM, Hallvord R. M. Steen
> <hallvord@opera.com>  wrote:
>>  (I replied directly first, second try re-sending since I haven't seen it on
>>  the list yet - sorry to Takayama-san and anybody else who got this twice..)
>>  Siterer ATSUSHI TAKAYAMA<taka.atsushi@googlemail.com>:
>>>  The current DOM3 Events spec
>>>  <http://www.w3.org/TR/DOM-Level-3-Events/#glossary-target-phase>  says;
>>>  useCapture of type boolean
>>>  If true, useCapture indicates that the user wishes to add the event
>>>  listener for the capture phase only, i.e. this event listener will not
>>>  be triggered during the target and bubbling phases. If false, the
>>>  event listener must only be triggered during the target and bubbling
>>>  phases.
>>>  This apparently has come from the DOM2 Events' "A capturing
>>>  EventListener will not be triggered by events dispatched directly to
>>>  the EventTarget upon which it is registered.". However, none of the
>>>  browsers (of Firefox 3.6, Safari 4, Chromium, Opera 10.10 and Opera
>>>  10.50) follow this. Opera used to be compliant with the spec, but they
>>>  have changed their behavior to match the rest.
>>  Thanks for spotting that - it's absolutely correct that we had to change
>>  this due to having too many compatibility problems with web content
>>  expecting capturing listeners to fire also on event target.
>>  I support changing the spec so that it says a capturing listener only
>>  fires during capture and at target phases but not during bubbling.
>>  -- Hallvord
Received on Wednesday, 14 April 2010 15:16:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:16 UTC