简体   繁体   English

chrome 开发工具和 Firefox 开发工具有什么不同?

[英]What is different between chrome dev-tools and Firefox dev-tools?

Im new in JavaScript and I wrote this js code on console:`我是 JavaScript 的新手,我在控制台上写了这个 js 代码:`

    function test (){} 
    var a1 = new test();
     a1;//chrome dev-tool test()
     a1;// firefox dev-tool : object {}
`

and run that on chrome dev-tool and Firefox dev-tool and I saw different results .并在chrome dev-toolFirefox dev-tool上运行它,我看到了不同的结果

1.in chrome w: test{} 1.在 chrome w: 测试{}
2.in Firefox: object{} 2.in Firefox:对象{}

chrome is essentially saying {} is an empty object that was constructed by a function with name test.Firefox is saying {} is an empty object of general construction from Object.the subtle difference is that Chrome is actively tracking,as an internal property,the name of the actual function that did the construction, whereas other browses don t track that additional information. chrome is essentially saying {} is an empty object that was constructed by a function with name test.Firefox is saying {} is an empty object of general construction from Object.the subtle difference is that Chrome is actively tracking,as an internal property,进行构造的实际 function 的名称,而其他浏览器不跟踪该附加信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM