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

[DOMCore] fire and dispatch

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 24 Feb 2011 12:41:00 +0100
To: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vren2mmw64w2qv@anne-van-kesterens-macbook-pro.local>
For DOM Core Ms2ger and I (and some others on IRC) decided to introduce a  
subtle distinction between fire and dispatch. Dispatching is actually  
going through the list of event targets with an initialized event whereas  
firing is initializing the event and then dispatching it.

E.g. a specification can say "fire an event named x" and DOM Core defines  
that to mean that you create an event of type Event, that all its flags  
are unset (unless specified otherwise), apart from its trusted flag which  
is true (when a specification says to dispatch an event it is trusted),  
that its name is x, etc. and that after you have initialized it in that  
way it is then dispatched.

We chose "fire" because HTML (and some other specifications, now including  
XMLHttpRequest and Progress Events) already use it in that way and because  
the more proper "initialize and dispatch" was thought to be too long for  
frequent use.


Anne van Kesteren
Received on Thursday, 24 February 2011 11:41:35 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:30 UTC