W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] Adding mouseenter and mouseleave events

From: Martijn <martijn.martijn@gmail.com>
Date: Fri, 16 Mar 2007 10:31:19 +0100
Message-ID: <6c97b8b10703160231t5abfe0bdx778df4527fc3916a@mail.gmail.com>
2007/3/16, Gareth Hay <gazhay at gmail.com>:
>
> 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.



Well, there more examples like that that, which are very successful, like
.innerHTML.

Regards,
Martijn


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
>
>


-- 
Martijn Wargers
Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://www.mozilla.org/contribute/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070316/a6444eb9/attachment.htm>
Received on Friday, 16 March 2007 02:31:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC