Suppose parent window has abc.xyz.com url and, I am opening a child window using: window.top.open
I am getting parent window object in child window using window.opener and polling the parent window url using window.opener.location.href.
Now, if the user click on a link in the parent window, which navigates to def.xyz.com then the window.opener.location.href is giving 'Permission Denied' and window.opener.closed is returning true. (in child script)
I need to change my child window if the parent window is not inside xyz.com
How do I know that the parent is navigated to xyz.com or some other domain?