Re: SVG12: wheelDelta should be UIEvent.detail

* Scott Hayman wrote:
>It seems odd to me, and here I am speaking on my own behalf and not that
>of the WG, that an event that inherits from MouseEvent could re-use the
>'detail' attribute for something other than what it is specified for by
>MouseEvent.  I would think that this would be more confusing than
>introducing a new attribute.

In DOM Level 2 Events, only three mouse event types use UIEvent.detail,
click, mouseup, and mousedown. For all three event types UIEvent.detail
reflects the same information; in order to avoid stating this for all
three event types, the specification just says once that if it is used,
then like this. The text there is not meant to establish a relationship
between the MouseEvent interface and UIEvent.detail.

>So the 'detail' attribute of MouseEvent in the DOM Level 3 Events spec
>no longer contains the information about the number of button presses?
>Isn't this a backwards compatibility issue?

There is no change, UIEvent.detail is still in use for click, mouseup,
and mousedown, and not in use for e.g. mousemove. If some event object
for a mousemove event in some implementation specifies the number of
mouse button presses and releases, then that implementation operates
outside of what is specified in the DOM Events specification. I do not
think this is particularily confusing, it is not important for e.g.
the mousemove event to inform about the number of clicks, but it might
be useful if it would carry information about, say, the direction of
the move, the current device velocity, or what mouse gesture is being
performed, a fixed relationship between the MouseEvent interface and
UIEvent.detail is neither needed nor useful, so it's not there.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Tuesday, 8 August 2006 18:05:22 UTC