get URL from another Windows generare ti js

I have this problem, I can't get the url of a window I open.

If I use

window.location

I get the result, but when I execute

window.location.origin

or others, nothing comes back to me, what can I do?

I see the error in catch and its a message :

domexception: permission denied to access property "document" on cross-origin object

I work in local with xampp, maybe It this the problem… Can u Help me pls

var win = window.open(popupurl, "authwindow", 'width=800, height=600');
var…

get URL from another Windows generare ti js