W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

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

From: Simon Pieters <simonp@opera.com>
Date: Thu, 26 Jan 2012 11:53:27 +0100
To: "Alex Russell" <slightlyoff@chromium.org>, "Kentaro Hara" <haraken@chromium.org>
Cc: "Ian Hickson" <ian@hixie.ch>, "Jacob Rossi" <Jacob.Rossi@microsoft.com>, "Anne van Kesteren" <annevk@opera.com>, "www-dom@w3.org" <www-dom@w3.org>, "schepers@w3.org" <schepers@w3.org>, "Dominic Cooney" <dominicc@chromium.org>, "Adrian Bateman" <adrianba@microsoft.com>
Message-ID: <op.v8otvdd1idj3kv@simon-pieterss-macbook.local>
On Wed, 25 Jan 2012 18:11:59 +0100, Kentaro Hara <haraken@chromium.org>  
wrote:

> Regarding event constructors, the draft Jacob wrote looks great to me.
>
> http://html5labs.com/dom4events/
>
> If we have consensus on the spec, I think that we should move forward
> to publishing it at w3.org and progressing it towards a standard.

I object to section 1.3 Feature Detection. Removing that section, or  
changing it so that it does not introduce new features or versions, would  
satisfy my objection. The HTML spec discourages use of feature strings and  
specs the minimal set of feature strings for HTML that are needed for  
compatibility. DOM4 forbids new specs to add new feature strings or new  
versions.

http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#dom-feature-strings
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-features

>
>>>> Another feature I've been considering to add to DOM4 Events is the
>>>> ability to inspect the list of registered event listeners on a node.
>
> I think this feature would be controversial. I suggest that we move
> forward to publishing the spec without adding the feature for now.
> Practically, I feel that we should not block the work to define event
> constructors by discussions around the new features.
>
> People have been hoping for event constructors, especially for
> MouseEvent and KeyboardEvent, because they are widely used and their
> init{Mouse,Keyboard}Event(...) have soooo many arguments. In addition,
> other Events (i.e. Event, CustomEvent, ProgressEvent, HashChangeEvent,
> MessageEvent, ErrorEvent, PageTransitionEvent, PopStateEvent and
> CloseEvent) already have constructors in their specs.
>
>
> Best Regards

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.

-- 
Simon Pieters
Opera Software
Received on Thursday, 26 January 2012 10:54:07 GMT

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