Jac*_*nkr 128 javascript console google-chrome
如果您在chrome控制台中运行它:
console.log.apply(null, [array])
Run Code Online (Sandbox Code Playgroud)
Chrome会给您一个错误:
// TypeError: Illegal Invocation
Run Code Online (Sandbox Code Playgroud)
为什么?(通过OSX在Chrome 15上测试过)
Pav*_*sky 179
在执行上下文从控制台更改为任何其他对象的情况下,它可能不起作用:
这是预料之中的,因为console.info期望它的"this"引用是console,而不是window.
Run Code Online (Sandbox Code Playgroud)console.info("stuff") stuff undefined console.info.call(this, "stuff") TypeError: Illegal invocation console.info.call(console, "stuff") stuff undefined此行为是预期的.
https://bugs.chromium.org/p/chromium/issues/detail?id=48662
| 归档时间: |
|
| 查看次数: |
25259 次 |
| 最近记录: |