Luke Kenneth Casson Leighton
lkcl at lkcl.net
Wed Aug 20 16:08:28 PDT 2008
i realise it's bad form to reply to your own posts but i thought i'd
keep people updated, being more important than worrying about that.
_really_ long day but i worked out that yes, Document::addEventListener
is the right place, yes, adding this:
gboolean webkit_web_frame_add_event_listener(WebKitWebFrame* frame)
is reasonable, yes, grabbing the frame->document() is ok, and yes,
i now have a printf statement in c-code which prints "hacked event callback click"
when you have called, from pywebkitgtk, main_frame.add_window_event_listener()
and subsequently click on the document.
i.e. i done it. hooray.
next stop is to add in a python function callback to
WebFrame.add_window_event_listener, and to work out how that gets called
with WebCore::Event. might just do it as gdk signals.
this _should_ be quite straightforward.
it's not ideal - to have potentially tens of thousands of snippets of
whilst ultimately i'll not end up using it - because there will be some
lovely DOM functions in c that can be wrapped in python hint hint - that
you can guarantee it has more uses than wot i want it for.
for some poor bugger to give themselves a headache over, bless 'em.
More information about the webkit-dev