Image

closing a child window

I have a function that is called when a person clicks "close" ie close()

How can I trigger the same function if they just close the child window?