我想从打开的弹出窗口中获取 url。我已经试过了window.location.href
。它不工作。当写console.log(window.location.href)
有unreadeable
打印。我如何url
从弹出窗口中获取React.js
var newWindow = window.open("http://www.google.com/", "Code",
'scrollbars=yes, width=' + 800 + ', height=' + 640 + ', top=' + top + ', left=' + left);
错误是
""react-dom.development.js:289 未捕获的 DOMException: 阻止了一个源为 " http://localhost:3000 " 的框架访问跨源框架。""