<分区>
我试图理解这段代码的奇怪行为:
window.setTimeout(window.location.reload, 200);
在 Firefox 中这会抛出一个 TypeError:
TypeError: 'reload' called on an object that does not implement interface Location.
在 Chromium 中,这会抛出另一个 TypeError:
Uncaught TypeError: Illegal invocation
这两种选择都很好:
window.setTimeout('window.location.reload()', 200);
window.setTimeout(function(){window.location.reload()}, 200)
为什么?