W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [DOMCore] fire and dispatch

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 25 Feb 2011 11:24:17 +0100
To: "Garrett Smith" <dhtmlkitchen@gmail.com>
Cc: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vrge6qgl64w2qv@anne-van-kesterens-macbook-pro.local>
On Fri, 25 Feb 2011 04:05:44 +0100, Garrett Smith <dhtmlkitchen@gmail.com>  
> OK. Why not expose a generic version of `fire` to the scripting  
> environment?

I do not know of any research (or have done any myself) as to how often  
such a feature might be useful for authors. While firing an event is  
currently a series of steps (using proposed optional arguments):

   var e = document.createEvent("Event")

... it is not hugely complicated. (We could even make the argument to  
createEvent optional too and default it to "Event".) I could imagine  
having something like EventTarget.fireEvent(name) but if you want to get a  
little beyond the basics you will remain stuck with creating the event  

Anne van Kesteren
Received on Friday, 25 February 2011 10:24:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC