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

Event.initEvent() after event dispatch

From: David Flanagan <david@oreilly.com>
Date: Tue, 21 Aug 2001 18:31:01 -0700
Message-Id: <200108220131.SAA01891@oxymoron.oreilly.com>
To: www-dom@w3.org

The description of the initEvent() method of the Event interface says
(in part): "This method may only be called before the Event has been
dispatched via the dispatchEvent method".  But it doesn't say what
happens if you try calling it for an event that has already been
dispatched.  

Shouldn't the behavior be specified in this case?  I'd imagine that
throwing a DOMException with the code property set to INVALID_STATE_ERR
would be the most sensible thing to do.

Maybe it was an intentional decision to leave this behavior unspecified,
and I suppose the spec is okay as it is, but I think it would be
stronger if it specified an exception or at least explicitly said "the
behavior is undefined".

	 David 
Received on Tuesday, 21 August 2001 22:24:58 GMT

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