Detection when closing cross domain popup

I have a javascript application that lives on site. To authenticate the user and set cookies, it opens a popup on the .com domain. (this is similar to Twitter @anywhere).

How do I detect when a popup on is closed and the function in javascript is called that opened it on the .com domain?

I've tried various methods like window.opener, window.unload, etc., but ran into cross-restrictions.


source to share

1 answer

window.postMessage will help you in browsers that support it ...



All Articles