On Oct 17, 2013 12:17 PM, "Sarvi Shanmugham" <sarvil...@gmail.com> wrote: > > The second one got me pas that error and I hit the following which I suspect is related to the lack of EventListener support > > DEBUG:pyjs.runners.giwebkit:sub-frame: <WebFrame object at 0x1510481e0 (WebKitWebFrame at 0x7fbae4009840)> > Traceback (most recent call last): > File "/Users/sarvi/Workspace/pyjs/pyjs/runners/giwebkit.py", line 603, in _frame_loaded_cb > __pyjamas__.set_main_frame(self) > File "/Users/sarvi/Workspace/pyjs/pyjswidgets/__pyjamas__.py", line 38, in set_main_frame > DOM.init() > File "/Users/sarvi/Workspace/pyjs/pyjswidgets/pyjamas/DOM.py", line 83, in init > mf._addWindowEventListener("click", browser_event_cb) > File "/Users/sarvi/Workspace/pyjs/pyjs/runners/giwebkit.py", line 687, in addWindowEventListener > listener = WebKit.dom_create_event_listener(cb._callback, None) > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/module.py", line 313, in __getattr__ > return getattr(self._introspection_module, name) > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/module.py", line 134, in __getattr__ > self.__name__, name)) > AttributeError: 'gi.repository.WebKit' object has no attribute 'dom_create_event_listener' > > I don't see a dom_create_event_listener in the webkit DOMWindow.idl below > https://github.com/WebKit/webkit/blob/master/Source/WebCore/page/DOMWindow.idl > > But I see this below. am I way off? where did you find the dom_create_event_listener? > > // EventTarget interface > [Custom] void addEventListener(DOMString type, > EventListener listener, > optional boolean useCapture); > [Custom] void removeEventListener(DOMString type, > EventListener listener, > optional boolean useCapture); > [RaisesException] boolean dispatchEvent(Event evt); > > void captureEvents(/*in long eventFlags*/); > void releaseEvents(/*in long eventFlags*/); > > I read through some of your threads/bug to WebKit/Gobject introspection about adding addEventListener below. > Is the above what you were looking for? > > https://bugs.webkit.org/show_bug.cgi?id=77835
Yep, this is the remaining thing that I have to implement via ctypes... the method is defined in the underlying gobject api, but since WebKitGTK authors did not add a GNotify callback to the signature, or use a GClosure, the introspection stuff is unable to automatically generate a non-leaky binding... therefore it gets skipped altogether. If you just change the function to skip that stuff (possibly by just `pass`ing it entirely), you should be able to run most if not all examples... event handling won't work, but it should still construct the DOM. I plan to wrap up the ctypes stuff over the weekend... I'll be at the in-laws house with my chromebook, but VPN+SSH usually let's me work all the same. -- C Anthony [mobile] -- --- You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.