WebKit bindings crash when I implement the "window-object-cleared" signal

WebKitGtk+ docs for that signal

Here's what I'm doing in Python:

browser = WebKit.WebView()
def on_cleared(*args):
browser.connect("window-object-cleared", on_cleared)

And here's the crash from my terminal when that WebView is shown:

$ ./webkit.py                  
** (webkit.py:17260): CRITICAL **: Converting of type 'void' is not implemented
ERROR:/build/buildd/pygobject-3.4.0/gi/pygi-argument.c:2084:_pygi_argument_from_g_value: code should not be reached
zsh: abort (core dumped)  ./webkit.py

Is that expected? That signal has some gpointer parameters in the C documentation, and I wonder if that's what's causing the problem. My reason for doing any of this is that I'd ultimately like to add a global object to the JS scope, so that the code in the page can call methods that I implement in Python. I read that "window-object-cleared" is the preferred place to set such an object in C at least, but maybe it's not possible from the Python bindings? Thanks for any suggestions.

-- Jack O'Connor

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]