I have an iframe in my html page from another website.

User does something in that iframe, and then the page closes itself. (that page isn't for me, I can't change the functionality of that)

I want my html page to detect this close command from child and then, change visiblity of the iframe to false.

How to do that??