return $doc.body;
}-*/;
private static void hookWindowClosing() {
// Catch the window closing event.
Window.addWindowCloseListener(new WindowCloseListener() {
public void onWindowClosed() {
// When the window is closing, detach all root panels. This will cause
// all of their children's event listeners to be unhooked, which will
// avoid potential memory leaks.
for (Iterator it = rootPanels.values().iterator(); it.hasNext();) {