这是一个愚蠢的问题。 有没有办法在使用Javascript,css或HTML的Internet Explorer 10& 11中始终如一地产生此错误?
此网页出现问题导致Internet Explorer关闭并重新打开标签。
这不适用于恶意网页,我需要测试一些插件并模拟IE崩溃的情况。
是否有任何已知问题在IE的所有版本中都会导致显示此错误?
答案 0 :(得分:2)
tldr; @CodingIntrigue的评论在Internet Explorer 11中对我有用
您可以在运行时使用html逻辑:
<script type="text/javascript">
while(true) {} //stop messing around and crash this window and let the default IE11 browser behavior open a new one
</script>
注意:我的浏览器窗口基本上已经在此时崩溃,因此很容易发生错误,而且100%的时间都很快发生了,但是我在其他页面上看到了更加骨架化,这不会像轻松/可靠或快速/立即使IE11崩溃
IE11的javascript react webapp发生内存泄漏,我试图做一个window.open
为我的应用程序重新启动内存,然后由于IE11,我想window.close
当前窗口相关的内存泄漏as described here会在用户使用浏览器时释放其在浏览器中的内存。
问题是我无法让window.open
在内存已满错误回调中工作,因为内存已满,无法执行,而是迫使IE11运行此默认/内部{{1}错误流达到相同的效果。您可能并不在意,但是下一个代码是我的用例如何使用此A problem with this webpage caused Internet Explorer to close and reopen the tab.
循环逻辑/策略。我为未处理的承诺添加了一个地方(如果我认为像在我的响应逻辑中那样处理它们,它并不总是会触发)
while
这下一部分是如果您需要填满内存(我永远无法使它正常工作-但我的内存却一直被填满,因此我并不需要过多地弄乱它),我从{{3 }}。您必须从那里弄清楚,它并没有完全按照您的问题进行修剪
window.addEventListener('error', function(e) { //respond to errors
var errorMessage = e && e.message ? e.message.toString() : '',
errorType = e && e.type ? e.type.toString() : '',
targetNodeName = e && e.target && e.target.nodeName ?
e.target.nodeName.toString().toUpperCase() : '';
//personally I added more if else logic here to only do this when necessary based on `errorMessage` and `errorType`
while(true) {} //stop messing around and crash this window and let the default IE11 browser behavior open a new one
})
window.addEventListener('unhandledrejection', function(e) {
//Note - I have not got this callback invoked yet
var errorMessage = e && e.message ? e.message : '';
console.log('in unhandledrejection callback listener: ' + errorMessage, e);
}, true); //`, true` to set `useCapture` Boolean