简体   繁体   English

“儿童”在Chrome Devtools中意味着什么?

[英]What does “child” mean in Chrome Devtools?

Since the first time I saw this "child" note, I can't understand: what does that mean? 自从我第一次看到这个“孩子”笔记以来,我无法理解:这是什么意思?

在此输入图像描述

It's the "type" of the object that is somehow derived by the console API. 它是由控制台API以某种方式派生的对象的“类型”。 Often it seems to be the name of the constructor function that created the object. 通常它似乎是创建对象的构造函数的名称。 Example: 例:

在此输入图像描述

The console API and output are not standardized, so environments can do whatever they want. 控制台API和输出不是标准化的,因此环境可以做任何他们想做的事情。 It's not a feature of JavaScript and therefore not really relevant for writing your code. 它不是JavaScript的一个特性,因此与编写代码无关。

I can only imagine the purpose is that you can more quickly recognize the "type" of the object when inspecting an object. 我只能想象,目的是在检查对象时可以更快地识别对象的“类型”。

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

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