Fwd: DOM event detection

Robin - www.dom may be a better place to discuss this.

-------- Original Message --------
Subject: 	DOM event detection
Resent-Date: 	Tue, 21 Dec 2010 10:56:25 +0000
Resent-From: 	<public-webapps@w3.org>
Date: 	Mon, 20 Dec 2010 23:44:24 +0000
From: 	ext Robin Winslow <robin@robinwinslow.co.uk>
To: 	<public-webapps@w3.org>



After a brief correspondence with Robin Berjon he suggested I post this 
suggestion here.

After having problems with detecting support for the HTML5 'input' event 
(http://goo.gl/XNSg5 http://goo.gl/rAa5f) I started wondering if there 
was a DOM specification for detecting support for DOM events in browsers.

After a brief email correspondence with Robin Berjon, and looking around 
a bit myself, it appears that there is no specific mention of this in 
the current HTML5 or DOM specifications. There is some mention of DOM 
events being exposed as methods (http://goo.gl/TYm2k) but this may not 
necessarily apply to all DOM elements.

Therefore, I'd like to suggest that we try to come up with a standard 
way of suggesting that support for DOM elements be exposed, to enable 
developers to tell which events are supported.

One method that works in Webkit and Gecko for many methods, although I 
don't think it's in any W3C specification, is to include methods for 
each event them in the "Event" object, e.g.:

'CLICK' in Event; // true
'CHANGE' in Event; // true
'INPUT' in Event; // false

Does that seem like a reasonable method of DOM event support detection? 
Could it be included as a recommendation in the specification somewhere?

Cheers,
Robin.

Received on Tuesday, 21 December 2010 11:51:37 UTC