pyjd.setup() returns None in pyjs mode. So, a safe way to run both in pyjs and pyjd is:
import pyjd from pyjamas import Window browser=pyjd.setup(url) *if browser:* browser.addCloseHandler(Window.onClosing) -- --- 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/d/optout.