[DOMCore] fire and dispatch

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.

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html


-- 
Anne van Kesteren
http://annevankesteren.nl/

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