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

Re: yet more DOM Level 3 Events issues

From: Christian Parpart <cparpart@surakware.net>
Date: Thu, 24 Jul 2003 21:55:31 +0200
To: Philippe Le Hegaret <plh@w3.org>
Cc: www-dom@w3.org
Message-Id: <200307242155.38836.cparpart@surakware.net>

Hash: SHA1

On Thursday 24 July 2003 8:45 pm, Philippe Le Hegaret wrote:
> 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.

Well, yeah, that's what I wanted to know. The detail property is undefined on 
interface KeyboardEvent and TextEvent so I can just set it to zero since the
init methods in my implementation invoke the init method of UIEvent to 
initialize their values ;)

btw, in my eyes it wasn't clear enough defined in the spec, so this should be 
explicitely said there....


- -- 
 21:47:40 up 65 days, 12:54,  0 users,  load average: 0.05, 0.04, 0.00
Version: GnuPG v1.2.2 (GNU/Linux)

Received on Thursday, 24 July 2003 15:51:42 UTC

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