Re: [indexeddb] Updates to the Event Constructor to match DOM 4

Awesome you are adopting this!

On Wed, 21 Sep 2011 20:58:22 +0200, Israel Hilerio <israelh@microsoft.com>  
wrote:
> This is our interpretation of how we see incorporating the new Event  
> constructor model defined in DOM 4.
>
> [Constructor(DOMString type, optional IDBVersionChangeEventInit  
> IDBVersionChangeEventInitDict)]
> interface IDBVersionChangeEvent : Event {
>     readonly attribute DOMString oldVersion;
>     readonly attribute DOMString newVersion;
>     void initIDBVersionChangeEvent (DOMString typeArg, boolean  
> canBubbleArg, boolean cancelableArg, DOMString oldVersion, DOMString  
> newVersion);
> };

This init*Event method has to go. We do not want new event interfaces to  
have it.


> NOTE: When constructing an IDBVersionChangeEvent you need to follow the  
> same steps defined in DOM4 Section 4.3 Constructing events.

Other specifications referencing DOM4 typically do not contain such a note.


> In addition, setting the onerror event handler with  
> window.addEventListener will return the ErrorEvent.  However, setting  
> the onerror event handler with window.onerror will return three  
> arguments as specified in HTML5 spec: event, source, and lineno [1].

The language here is somewhat confusing. "Setting ... will return"? Also,  
window.onerror can be used as regular event handler as well, it does not  
always use its three-argument version.


> [1] http://dev.w3.org/html5/spec/Overview.html#event-handler-attributes


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 21 September 2011 21:20:59 UTC