W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

ISSUE-129 (event constructors): Revist event constructors [DOM3 Events]

From: Web Applications Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Wed, 15 Sep 2010 18:01:29 +0000
To: public-webapps@w3.org
Message-Id: <E1OvwIT-0007JD-En@otto.w3.org>

ISSUE-129 (event constructors): Revist event constructors [DOM3 Events]


Raised by: Doug Schepers
On product: DOM3 Events

Simon Pieters <http://lists.w3.org/Archives/Public/www-dom/2010JulSep/0125.html>:
An idea for creating events is to support [Constructor] on all event  
IDLs, which makes the createEvent method unnecessary.

Maybe we could even make the arguments to the constructor be called to  
initFooEvent() directly, so instead of doing

    var e = document.createEvent('MouseEvents');
    e.initMouseEvent('click', ...);

you could do

    foo.dispatchEvent(new MouseEvent('click', ...))

Another thing we could change is to make all but the first arguments to  
initFooEvent() optional and let them have sensible defaults, so that if  
all you care about is the event type, you can include just the first  

If the constructor is called with no arguments, then initFooEvent() would  
not be called.
Received on Wednesday, 15 September 2010 18:01:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 13:55:36 UTC