Re: yet more DOM Level 3 Events issues

On Tue, 2003-07-22 at 04:28, Christian Parpart wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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.

Philippe

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