close the window
Closes the window displayed by the Window.showModal method.
You can check if the window can be closed by raising the Window.onCloseQuery event before closing the window.
On Android, the Window.onCloseQuery event does not fire and Activity.finish () is called to exit.