[webkit-dev] On IDL files, events and writing DOM bindings

Xan Lopez xan at gnome.org
Tue Aug 10 12:28:14 PDT 2010


On Tue, Aug 10, 2010 at 8:59 PM, Xan Lopez <xan at gnome.org> wrote:
> On Tue, Aug 10, 2010 at 8:32 PM, Adam Barth <abarth at webkit.org> wrote:
>> I'm not sure I understand your question.  Every event can happen on
>> every EventTarget.
>
> I mean that an HTMLMediaElement will naturally emit an 'ended' Event
> in some situations, but an HTMLImageElement won't. I see no obvious
> way of knowing that (or other similar facts) from the IDL files.

Answering myself after the trip home, I take it that the answer is
basically that the information I want is not useful when writing the
bindings (since as you say any event can in theory happen in any
target, be it naturally or synthetically), and that I should simply
collect all event classes defined and add them as "this class might
possible receive this event" where appropriate in the class hierarchy?
Another question would be whether we maintain the canonical list
somewhere (perhaps in DOMWindow.idl ) or if we are supposed to
construct it ourselves manually.

>
> Xan
>
>>
>> Adam
>>
>


More information about the webkit-dev mailing list