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: Sun, 13 Mar 2011 00:23:17 +0200
Message-ID: <4D7BF255.4070105@helsinki.fi>
To: Glenn Maynard <glenn@zewt.org>
CC: Jacob Rossi <jrossi@microsoft.com>, Anne van Kesteren <annevk@opera.com>, "www-dom@w3.org" <www-dom@w3.org>
On 03/11/2011 10:39 PM, Glenn Maynard wrote:
> On Fri, Mar 11, 2011 at 12:54 PM, Jacob Rossi<jrossi@microsoft.com>  wrote:
>> Actually, null string has nothing to do with it. Anne has spec'd the default to be empty string, not null.
>
> The null string and the empty string mean the same thing: "", not null.
>
>> But spending time defining behavior that conflicts all current implementations and has no use case just stalls the progression of DOM L3 Events and yields no real value add.
>
> Not all.  WebKit doesn't check whether initEvent was called; it just
> checks whether event.type != "".  If it's to allow e.type == "", it
> would need a new flag indicating whether initEvent was called.
>
> Firefox seems buggy here.
>  It neither dispatches the event nor throws
> an exception when dispatchEvent is called without initEvent.
>  It seems
> to silently do nothing, which I think is wrong in any case.  (I havn't
> checked the source to see precisely what's happening.)
>

In Gecko the event is dispatched just normally in that case.
But because the event isn't initialized to "", or null, or anything 
else, no listener for it can be called.
That sounds pretty reasonable to me, although based on
D3E UNSPECIFIED_EVENT_TYPE_ERR should be thrown.

I'll fix this soon so that Gecko will throw that exception, and
still allow "" in the initEvent as it does now.

-Olli
Received on Saturday, 12 March 2011 22:24:14 GMT

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