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

Re: Detecting and Creating Events

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Mon, 24 Aug 2009 10:19:13 +0100
To: Sean Hogan <shogun70@westnet.com.au>
CC: Garrett Smith <dhtmlkitchen@gmail.com>, DOM mailing list <www-dom@w3.org>
Message-ID: <14ffe6da6e004c3844443901d68ab1ca3bb756a3@localhost>
Sean Hogan <shogun70@westnet.com.au> wrote:

> Stewart Brodie wrote:
> > Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> >
> >
> >> The inability to easily and accurately detect events is a problem.
> >> Programs want to know if an event is implemented at runtime. If it is,
> >> then the feature can be used. If not, it a fallback stratety is in
> >> order. Many new event types are being created and implemented. How can
> >> a program feature-test to see if they are implemented?
> >>
> >
> > DocumentEvent.canDispatch() would seem to fit the bill, although it's
> > not clear exactly what criteria this method is supposed to base its
> > answer on right now.  You could suggest a clarification for the text and
> > then you don't need to add all those new methods.
> >
> >
> Yes, can we have a clarification of the text. I would hope that if
> canDispatch() was already implemented in Firefox-3.5  then
> document.canDispatch("mouseenter") would return false.

Given the wording is totally ambiguous, as Garrett previously indicated, it
is perfectly at liberty to return true.  I also found the wording too vague
to even attempt implementing it, so I just left it out.  I interpreted it as
meaning that the implementation will return true if the event type passes
validation (i.e. isn't an empty string) on the basis that "it is able to
dispatch the event".  I couldn't see how some events could be dispatchable
but others not so.


-- 
Stewart Brodie
Software Engineer
ANT Software Limited
Received on Monday, 24 August 2009 09:19:54 GMT

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