【发布时间】:2020-08-27 21:35:42
【问题描述】:
为了我的应用程序测试目的,我想在一个单独的窗口中崩溃 chrome url, 但是下面的代码给了我“不允许加载本地资源”的错误。
有什么方法可以通过 window.open 启动 chrome 崩溃 url 而不会收到错误?
这是我尝试过的:
<html>
<head>
<title>Sample Test</title>
<script type="text/javascript">
function crashTest() {
window.open("chrome://inducebrowsercrashforrealz", "windowInMyApp", "left=50, top=100, width=600, height=400, toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
</script>
</head>
<body>
<div>
<br />
<button onclick="crashTest();">Navigate</button>
</div>
</body>
</html>
【问题讨论】:
标签: javascript html google-chrome google-chrome-extension chromium