I have the following code (from related) that works for finding a reference to previously opened windows and closing them.
var playerUrl = 'http://my.player...';
var popupPlayer= window.open('', 'popupPlayer', 'width=150,height=100') ;
if(popupPlayer.location == 'about:blank' ){
popupPlayer.location = playerUrl ;
}
popupPlayer.focus();
This also works across tabs in firefox, but in chrome it seems as if each separate tab is unaware of what is happening in the other tabs. I'd suspect this is due to each tab being a different process but is there anyway to bypass this?
So basically, if we open window A from page A in tab A, can we get a reference to window A from page B in tab B, and close it in chrome?
Related to:
Edit:
I found this that may be useful for messaging all other tabs to do the close action, though haven't tested in chrome: Sending a message to all open windows/tabs using JavaScript