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

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 UTC