Here is my code
tl2010handle = window.open("/path/main.html", 'tl2010', 'statusbar=no,toolbar=no,scrollbars=no,locationbar=no,setResizable=no,width=840,height=600');
setTimeout(function() {console.log(tl2010handle.window.location.href)}, 2000);
If I load my page as https://ec2b.foo.com/console/login2020.jsp
I get DOMException: Blocked a frame with origin "https://ec2b.foo.com" from accessing a cross-origin frame.
If I add an entry 143.67.75.100 ec2b
to /etc/hosts, and then load my page as https://ec2b/console/login2020.jsp
it works and my console logs the href.
The mystery is that I am opening the window with a URL that does not specify an origin, so I don't understand how Chrome can complain that my request is cross-origin.
The code only exists on one server so there is no possibility that ec2b and ec2b.foo.com are different. Also confirmed with dig. I've tried this in both Chrome and Firefox with the same result, albeit that in the case of Firefox, the tl2010handle variable is unset in the first case, and set in the second case.