Re: Fwd: [IndexedDB] Event handlers

On 22/01/13 3:27 AM, David Bruant wrote:
> I assume in these cases, the interface always inherits from EventTarget;
> tell me if it's not always the case.
> Would it make sense to add an event annotation, as in:
>
>      event success
>
> WebIDL would describe this as "attribute EventHandler onsuccess;" +
> "instances can trigger such an event in circumstances described by the
> spec". The latter part is omitted from WebIDL and I think it would be
> extremely valuable for developers too to see that things are events and
> not just on* properties.
>
> What do you think?

It seems a bit like a layering violation for Web IDL to describe events. 
  The "EventHandler" name is already pretty suggestive about the purpose 
of the attribute, IMO. :)

Received on Thursday, 24 January 2013 07:55:10 UTC