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

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

From: Kentaro Hara <haraken@chromium.org>
Date: Thu, 26 Jan 2012 09:18:04 -0800
Message-ID: <CABg10jytv317RObmOBFXH0NJ=S6yoZKrbow05GUd7w0dvkMPBA@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Alex Russell <slightlyoff@chromium.org>, 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>
Thanks, Simon.

> 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

Agreed.


> 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).

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.


On Thu, Jan 26, 2012 at 2:53 AM, Simon Pieters <simonp@opera.com> wrote:
> 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



-- 
Kentaro Hara, Tokyo, Japan (http://haraken.info)
Received on Thursday, 26 January 2012 17:19:03 GMT

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