为什么使用typeof时firebug和chrome的控制台会产生不同的结果?

时间:2013-01-08 10:52:42

标签: firebug

使用firebug和google chrome的Web控制台测试typeof会显示不同的结果。

萤火虫:

console.log(typeof Node); //object
console.log(typeof HTMLDivElement); //object

Chrome的控制台

console.log(typeof Node); //function
console.log(typeof HTMLDivElement); //function

1 个答案:

答案 0 :(得分:1)

这与devtools没什么关系;只是Firefox没有完全遵循规范。这在最近的版本中正在发生变化,这两者都应该与Firefox 19中的Chrome相匹配。 [1] [2]