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

Re: Clarification on mouseenter/mouseleave

From: João Eiras <joaoe@opera.com>
Date: Tue, 29 Jun 2010 01:55:18 +0100
To: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <op.ve1d6gx92q99of@coruscant>
On Mon, 28 Jun 2010 21:12:07 +0100, Bjoern Hoehrmann <derhoermi@gmx.net>  

> * João Eiras wrote:
>> Hi gentlemen and ladies.
>> The specification for mouseenter and mouseleave
>> http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mouseenter
>> http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mouseleave
>> as far as I know, is the description of the first (and currently one and
>> only) implementation of that same feature in any browser which is  
>> Internet
>> Explorer.
>> a)
>> The spec however remarks that the event does not bubble. Well, in IE  
>> they
>> do bubble. See attached testcase.
> In order to test what the bubbling behavior of an event object is, if
> you do not trust the value of the corresponding property of the event
> object, you have to register event listeners for an element and one of
> its ancestors.

No, I don't have to register two listeners.
For a browser that implements the dom event model, I check target.
In IE check toElement in mouseenter/over, fromElement in mouseleave/out  
and srcElement in all others.
Those properties have all the info needed.
If I register the two listeners, the same result upholds.

> Your test case only registers listeners on one element,
> so it does not test the bubbling behavior. Your findings are mistaken,
> http://lists.w3.org/Archives/Public/public-webapi/2008May/0111.html
> should be a proper description of how the events are implemented in IE.

I don't understand how I can be mistaken if the testcase is factual and  
shows what I said.
I case of doubt, I attached a slightly more explicit one, although you  
have to inspect the output in the textarea.

Received on Tuesday, 29 June 2010 00:55:55 UTC

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