[webkit-gtk] EventTarget interface in GObject DOM bindings

Carlos Garcia Campos cgarcia at igalia.com
Wed Oct 23 02:35:35 PDT 2013

El mar, 22-10-2013 a las 10:40 +0200, Carlos Garcia Campos escribió:
> While working on bug #77835, to make add/remove_event_listener
> introspectable, I've noticed there are several issues with the way we
> expose the EventTarget interface. 
> It's defined as:
>     void addEventListener(DOMString type, 
>                           EventListener listener, 
>                           optional boolean useCapture);
>     void removeEventListener(DOMString type, 
>                              EventListener listener, 
>                              optional boolean useCapture);
>     [RaisesException] boolean dispatchEvent(Event event);
> And we are doing several things differently:
>   1) Our add/remove_event_listener methods return gboolean.
>   2) Our dispatch_event returns void
>   3) But, we are also exposing dispatch_event in objects implementing
> EventTarget as a public API returning gboolean
>   4) As C Anthony pointed out in the bug, we have a bubble boolean
> argument in add/remove_event_listener instead of capture

I've just noticed that we are actually using capture, but using the
wrong name. The boolean argument we are receiving from the API is what
we are passing to WebCore, see:


So, we can simply rename the argument as use_capture.

Carlos Garcia Campos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20131023/7f955126/attachment.sig>

More information about the webkit-gtk mailing list