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

Some more comments on Events

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Thu, 23 Aug 2001 16:41:18 -0600
Message-ID: <70E215722F6AD511820A000103D141D40AA50A@thor.aeathtl.com>
To: "'www-dom@w3.org'" <www-dom@w3.org>
As if that last message wasn't rambling enough, a few other comments:


"A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "MouseEvents" and "3.0" (respectively) to determine whether or not the Mouse
event module is supported by the implementation. "

That and similar passages imply that level 2 implementations don't support the corresponding event modules, since they would return false to hasFeature(modulename,"3.0").  They do support it, just not
at the L3 version.  An L3 version of an L2 introduced module, should return true if the version is null, "", "2.0" or "3.0".

Section 1.6.3: Text events

"A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "TextEvents" and "3.0" (respectively) to determine whether or not the Mouse
event module is supported by the implementation. "

Okay, but how do I detect that the Text event module is supported by the implementation (the passage says Mouse event module).


-------------------

dispatchEvent(evt)

Per the discussion in the previous message, it should be clarified that passing any arbitrary object that supports the Event interface is unlikely to work.  Even two Java implementations of Event
could not trade events since there is no mechanism for the dispatching code to change the current target and event phase of an arbitrary event, it requires a cast to an implementation specific Event
type.

You would probably be able to use events from a different document built by the same implementation, but even that might be problematic.

The only safe event is one that was freshly created by DocumentEvent.createEvent and has never been dispatched.

I would not require a WRONG_DOCUMENT_ERR exception for performance reasons, but it would seem to be something that should be allowed, as well as a class cast exception which would occur naturally when
the parameter is cast to the implementation specific type for dispatching.


---------------

It might be useful to cause a call to init*Event() after dispatch has started to raise an exception.  Dispatching an event a second time should also raise an exception.
Received on Thursday, 23 August 2001 18:43:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:49 GMT