[Webkit-unassigned] [Bug 77835] [GObject bindings] EventListeners as first-class GObjects: WebKitDOMEventListener
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 13 11:38:48 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=77835
--- Comment #33 from Zan Dobersek <zandobersek at gmail.com> 2012-03-13 11:38:49 PST ---
I'll just post some concerns about the API for starters.
> b/Source/WebCore/bindings/gobject/WebKitDOMCustom.h:49
> +WEBKIT_API WebKitDOMEventListener* webkit_dom_document_create_event_listener(WebKitDOMDocument* self, GClosure* handler);
Event listener is in no way tied to a document in the DOM spec, meaning creating it should be done through a standalone function - webkit_dom_event_listener_create.
I'm reiterating ideas previously written in comment #22 - webkit_dom_event_listener_create would take in a WebKitDOMEventListenerFunc, gpointer to a data and a GDestroyNotify callback. As far as I am concerned, this is the most optimal solution. Using a GClosure is just another unnecessary step that should be avoided if possible.
> b/Source/WebCore/bindings/gobject/WebKitDOMCustom.h:58
> +WEBKIT_API void webkit_dom_event_listener_set_handler(WebKitDOMEventListener* self, GClosure* handler);
The DOM spec does not allow these sorts of manipulations on an event listener, and I am of a very strong opinion that we shouldn't neither.
> b/Source/WebCore/bindings/gobject/WebKitDOMCustom.h:68
> +WEBKIT_API GClosure* webkit_dom_event_listener_get_handler(WebKitDOMEventListener* self);
Ditto.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list