sách gpt4 ai đã đi

polymer này.$ bộ sưu tập

In lại 作者:行者123 更新时间:2023-12-01 11:23:48 29 4
mua khóa gpt4 Nike

我正在阅读事件指南和指南的开头,它说:

You can also add an event listener to any element in the this.$ collection using the syntax nodeId.eventName.



Là gì this.$收藏?

1 Câu trả lời

this.$包含从 Automatic node finding 创建的节点:

Polymer automatically builds a map of statically created instance nodes in its local DOM, to provide convenient access to frequently used nodes without the need to query for them manually. Any node specified in the element's template with an nhận dạng is stored on the this.$ hash by nhận dạng.

Note: Nodes created dynamically using data binding (including those in dom-repeatdom-if templates) are not added to the this.$ hash. The hash includes only statically created local DOM nodes (that is, the nodes defined in the element's outermost template).



<đầu>











HTMLImports.whenReady(function() {
Polymer({
is: 'x-foo',
ready: function() {
console.log('div1', this.$.div1.textContent);
console.log('div2', this.$.div2.textContent);
console.log('div3', this.$.div3.textContent);
}
});
});


关于 polymer this.$ 集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39432359/

29 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com