RE: "DOM4 Events" Proposal (was: Spec proposals for Event constructors)

> -----Original Message-----
> From: Simon Pieters [mailto:simonp@opera.com]
> Sent: Friday, January 27, 2012 1:18 AM
> To: Kentaro Hara
> Cc: Alex Russell; Ian Hickson; Jacob Rossi; Anne van Kesteren; www-
> dom@w3.org; schepers@w3.org; Dominic Cooney; Adrian Bateman
> Subject: Re: "DOM4 Events" Proposal (was: Spec proposals for Event
> constructors)
> 
> On Fri, 27 Jan 2012 09:54:59 +0100, Simon Pieters <simonp@opera.com>
> wrote:
> 
> > On Thu, 26 Jan 2012 18:18:04 +0100, Kentaro Hara
> > <haraken@chromium.org>
> > wrote:
> >
> >>> One of the ideas with event constructors was not only to introduce
> >>> the constructor, but also to get rid of init*Event() methods where
> >>> possible. So ideally, e.g. the WheelEvent interface would not have
> >>> the legacy method, since it's (I assume) not needed for compat with
> >>> existing content.
> >>
> >> Yes, we should remove init*Event() from the spec IDL. We can just
> >> note
> >> "Note: As events have constructors, initEvent() is superfluous.
> >> However, it has to be supported for legacy content.", just like the
> >> spec of Event (http://www.w3.org/TR/dom/#interface-event).
> >
> > Those two options are mutually exclusive. Either initFooEvent() is not
> > needed for compat, and should be removed completely (like e.g.
> > initProgressEvent()
> > http://www.w3.org/TR/progress-events/#progressevent

> > ), or it is needed for compat, and should be kept, like initEvent() in
> > DOM4.
> >
> > A guess is that initUIEvent and initMouseEvent are needed for compat,
> > and the rest aren't.
> 
> http://koders.com/ (with language set to JavaScript)
> 
> inituievent            352
> initmouseevent       3,405
> initkeyboardevent        7
> initwheelevent           0
> inittextevent            0
> initcompositionevent     0
> initfocusevent           0

I'm hesitant to remove the init methods we've already shipped without very compelling compat data (more than just on Google Code, but that's a useful start). I'll see if I can check some of our sources for this to understand the risk a bit better.  

In general, I'd lean towards leaving them in as they're not in technical conflict event constructors. But if we have compelling data they're not in use, then I'd consider it. 

> >
> >> Jacob: Would you please update the "..." parts in the IDL in the spec
> >> draft? I think we can copy IDL attributes from the DOM3 event specs.

Sure I can do that. 

It sounds like there's interest from several members to bring this into webapps.
Art, is there an appropriate place that I can publish this on w3.org so that I can start using CVS? And what are the next steps to get this added as a deliverable for the WG (we discussed this briefly at TPAC)?

Received on Saturday, 28 January 2012 02:21:15 UTC