W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

Re: yet more DOM Level 3 Events issues

From: Philippe Le Hegaret <plh@w3.org>
Date: 24 Jul 2003 14:45:03 -0400
To: Christian Parpart <cparpart@surakware.net>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1059072302.13705.266.camel@jfouffa.w3.org>

On Tue, 2003-07-22 at 04:28, Christian Parpart wrote:
> Hash: SHA1
> hi
> it is said in the spec that TextEvent and KeyboardEvent are child classes of 
> UIEvent (of course). 
> UIEvent needs a detail arg to be passed to be initialized. but the initializer 
> routines of KeyboardEvent and TextEvent do not get these? Why?

TextEvent and KeyboardEvent don't use detail as a context information.
UIEvent do have a detail parameter in init and it can be used by
sub-classes, such as MouseEvent.

> How shall these handle this?

In any case, the detail property value of TextEvent and KeyboardEvent
has no specific meaning. I would suggest initializing to 0 but you can
do otherwise in your implementation if you wish :)

One can argue that it is possible to generate a valid Mouse event with
using only initUIEvent, so I would be in favor of keeping the statu quo,
i.e. the value of detail is undefined on text event and keyboard event.
Applications may still wish to initialize the value of detail using
initUIEvent (since it is supported in text and keyboard event objects as
well) but it is certainly useless.

Received on Thursday, 24 July 2003 14:58:16 UTC

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