[whatwg] Adding mouseenter and mouseleave events
Gareth Hay
gazhay at gmail.com
Fri Mar 16 00:41:49 PDT 2007
Well, the current W3C spec has relatedTarget specifically for these
use cases, so again I fail to see why adding convenient shorthand for
functionality is a good thing here.
If we try to cover everyone's use cases with easy functionality, the
spec is going to be huge with lots of overlapping functions and
elements. To me this is simply a programming problem, which is easily
solved to the use cases suggested, and also the inverse of actually
wanting the bubble.
Gareth
On 16 Mar 2007, at 03:41, Benjamin West wrote:
> This is a pretty well known issue, and a constant stumbling block.
> There are use cases for using the capture/bubble stuff[1]. However,
> by far, the most common need is for simple one-off's, and the bubbling
> really gets in the way. The issue is explained quite well on PPK's
> site:
> <http://www.quirksmode.org/js/events_order.html>
> <http://www.quirksmode.org/js/events_mouse.html> <-- covers mouseenter
> and mouseleave and why it's better (because it explains how tedious
> the traditional model is first.)
>
> The bottom line is that introducing mouseenter and mouseleave will
> reduce a lot of CPU cycles, and make authoring a lot easier.
>
> [1] http://decafbad.com/blog/2006/10/31/event-delegation-based-
> dhtml-drag-and-drop
> http://icant.co.uk/sandbox/eventdelegation/
>
> -Ben
More information about the whatwg
mailing list