gpt4 book ai didi

polymer - Polymer 元素中的 this 和 this.root 有什么区别

转载 作者:行者123 更新时间:2023-12-02 01:32:05 25 4
gpt4 key购买 nike

Polymer 的开发人员指南说您需要使用 this.root 来访问正在定义的元素。但是看看 Chrome 开发工具,这似乎也指向了这个元素。

有什么区别。我在这里缺少什么微妙的东西吗?

最佳答案

元素声明范围中的

this 表示元素本身。 this.root 指的是元素的影子根(如果存在的话)。

关于polymer - Polymer 元素中的 this 和 this.root 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33529738/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com