Yes, i saw it. But this is analog of querySave, not queryClose. In queryClose i can to prohibit close window. Оr do something before you save the document, and after a decision on the preservation of the document and permission to close the window.
Sorry for my Google-English .