[jQuery] Raising an event when a popup window is closing

[jQuery] Raising an event when a popup window is closing


I have a page with a popup that I want to raise an event for when the
popup is being closed. Is there any event built-in to jQuery without
any plugins that can be subscribed to for when a popup is closed?
I can't seem to figure out any way to do this even without using
jQuery. Is there any way to do something like this in jQuery?:
var myWindow = window.open("/MyPopup.aspx, "myWindow",
"height=550,width=780,top=100,left=100");
$(myWindow).bind('close', function(){alert("Closed.")});