Re: [DOMCore] Making event initializing easier

On Fri, 01 Jul 2011 22:43:45 +0200, David Flanagan <dflanagan@mozilla.com>  
wrote:
> You should swap the order of steps 3 and 4, or include text in step 4
> excluding dictionary members named "type".

The dictionary defined does not include type so any members named such  
will not make it that far.


> Should this algorithm also set isTrusted?  That attribute actually seems
> overspecified currently.  initEvent() sets it explicitly, and there is
> text that says that it must be initialized to false, and it is also set
> explicitly by dispatchEvent() even though it is readonly.

initEvent() sets it because you can have a trusted event that an author  
changes. dispatchEvent() sets it for the same reason.


> Does this spec need to say something about when isTrusted is true?

It says so in the fire an event steps.


> Step 2 should probably only succeed if it is the name of an interface
> that inherits from Event and defines an initEvent() method, right?

No. Events created that way however cannot do more than changing the type  
and whether it bubbles or is cancelable using the initEvent() method.


> Hixie said he plans to remove the initEvent() methods for whatever event
> interfaces he can.  If he does that, it will probably require changes to
> the table in step 1.


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

Received on Saturday, 2 July 2011 06:43:00 UTC