W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

Re: Fwd: [IndexedDB] Event handlers

From: Anne van Kesteren <annevk@annevk.nl>
Date: Thu, 24 Jan 2013 09:26:12 +0100
Message-ID: <CADnb78ipNzASScaZ7-ySuV9v4UNLAKL9yxhvOUPyi66pzAMNcQ@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: David Bruant <bruant.d@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Ms2ger <ms2ger@gmail.com>
On Thu, Jan 24, 2013 at 8:55 AM, Cameron McCormack <cam@mcc.id.au> wrote:
> 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. :)

The main problem at the moment with on/event/ is that you cannot
actually tell from that whether such events will be dispatched on that
object and no others. (E.g. DOMContentLoaded is dispatched on objects,
but has no corresponding on/event/ attribute, events for media
elements have on/event/ attributes on HTMLElement rather than just
<video> and <audio>, etc.) Although I suppose that is only true for
HTMLElement/Document/Window and not true for other classes, such as
XMLHttpRequest.

I don't think we've settled on a strategy here yet.


Maybe IDL is not the right place, but giving a listing of events
dispatched next to the IDL might be nice for developers trying to
figure out what the object can do.


-- 
http://annevankesteren.nl/
Received on Thursday, 24 January 2013 08:26:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:08 UTC