问题描述
我遇到了这个问题,我无法获取我打开的窗口的网址。
如果我使用
window.location
我得到了结果,但是当我执行时
window.location.origin
或者其他人,什么都没有回我,我该怎么办?
我在 catch 中看到错误及其消息:
domexception: permission denied to access property "document" on cross-origin object
我在本地使用 xampp,也许这就是问题所在... 你能帮我吗
var win = window.open(popupurl,"authwindow",'width=800,height=600');
var pollTimer = window.setInterval(function () {
try {
if (win.document.URL.indexOf(CLIENT_REDIRECT) != -1) {
window.clearInterval(pollTimer);
deffer.resolve(CODE);
win.close();
}
} catch (e) { }
},500);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)