【发布时间】:2020-01-01 10:49:49
【问题描述】:
在 Microsoft Edge 中,当 url 与当前域不同时,以下 sn-p 将忽略传递给 window.open() 的选项。但是它在 Chrome 和 Firefox 中运行良好,并且当域是相同的来源时。
const popupWindow = window.open(
url,
title,
'menu=no,toolbar=no,width=700,height=600,scrollbars=1,resizable=0,' +
'directories=no,location=no,screenX=0,screenY=0,top=48,left=48',
);
我找到了一个让窗口正确调整大小的 hacky 解决方法,但这真的很烦人,你可以看到它重定向页面。
const popupWindow = window.open(
"/#",
title,
'menu=no,toolbar=no,width=700,height=600,scrollbars=1,resizable=0,' +
'directories=no,location=no,screenX=0,screenY=0,top=48,left=48',
);
popupWindow.location.href = url;
如何在 Microsoft Edge 上进行这项工作?为什么 Microsoft Edge 会忽略我的大小和其他参数?这是一个错误吗?
【问题讨论】:
标签: javascript html browser microsoft-edge