I found a way to catch the window close event.
Browser.on_unload_callback() in mshtml.py catches the window close event.
I modified Browser() class to add event handlers, and pyjd to return the
browser object created.
import pyjd
from pyjamas import Window
browser=pyjd.setup(url)
browser.addCloseHandler(Window.onClosing)
Now, Window.addWindowCloseListener() will catch the event:
class WindowListener:
def __init__(self):
Window.addWindowCloseListener(self)
Window.addWindowResizeListener(self)
The current pyjs in GitHub doesn't have pyjd installation and I tested the
code only in the release version (pyjs0.8.1a) You can find the code in my
GitHub fork (https://github.com/chopin/pyjs)
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.