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

Thank you Doug,

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

Here it is. useCapture is true.

=== html ===
<input type="button" id="target" value="Click me" />
<script>
var target = document.getElementById('target');
target.addEventListener('click', function(e) {
  if (e.eventPhase === Event.AT_TARGET && e.target === target) {
    alert('Should be no alert')
  }
}, true);
</script>
=== /html ===

If eventPhase is the target phase, and event target is the element on
which the EventListener was set, then the event should not be fired.
Firefox, Opera, Safari, Chromium all fires.

A. TAKAYAMA

Received on Wednesday, 14 April 2010 15:47:40 UTC