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

Re: Conflicts between D3E and Web DOM Core

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Thu, 10 Mar 2011 17:02:29 +0200
Message-ID: <4D78E805.3080402@helsinki.fi>
To: Anne van Kesteren <annevk@opera.com>
CC: "www-dom@w3.org" <www-dom@w3.org>, Jacob Rossi <jrossi@microsoft.com>
On 03/10/2011 10:01 AM, Anne van Kesteren wrote:
> On Thu, 10 Mar 2011 04:30:17 +0100, Jacob Rossi <jrossi@microsoft.com>
> wrote:
>>> Why should we have the artificial restriction? What exactly does
>>> initEvent() do that is required here?
>> initEvent() populates the event object with the necessary properties
>> to make it useful. An event without a type is just a bad programming
>> practice that we shouldn't be encouraging. You use the term
>> "artificial" yet it's not artificial: *all* browsers have this
>> restriction today and it's what the spec says. Changing it to be
>> otherwise requires me to ask, "what's the use case?" Unless there's a
>> valid use case for events without a name, then there's no reason to
>> change.
> It is artificial because you can just invoke initEvent with the empty
> string, false, and false, and the event object will be identical. So you
> are essentially throwing for not invoking initEvent which is rather silly.

Why is that silly? Quite often when you have objects with
some kind of init method, you want to "prevent" object usage
before the init is called.
Received on Thursday, 10 March 2011 15:03:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC