RDCLR_DEV Telegram 10
Немного про контекст в веб-компонентах.

В компонентах this — это и сам элемент из разметки, и экземпляр класса в js. Через this мы получаем нужные нам свойства из дата-атрибутов (this.dataset.color, this.dataset.text) и объявляем новые свойства в нашем классе (this._color, this._text).

Веб-компоненты на примере можно посмотреть по ссылке: https://jsfiddle.net/drLt21yn/

#rdclr_frontend #Vanilla_JS #code



tgoop.com/rdclr_dev/10
Create:
Last Update:

Немного про контекст в веб-компонентах.

В компонентах this — это и сам элемент из разметки, и экземпляр класса в js. Через this мы получаем нужные нам свойства из дата-атрибутов (this.dataset.color, this.dataset.text) и объявляем новые свойства в нашем классе (this._color, this._text).

Веб-компоненты на примере можно посмотреть по ссылке: https://jsfiddle.net/drLt21yn/

#rdclr_frontend #Vanilla_JS #code

BY RDCLR.DEV




Share with your friend now:
tgoop.com/rdclr_dev/10

View MORE
Open in Telegram


Telegram News

Date: |

Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. In handing down the sentence yesterday, deputy judge Peter Hui Shiu-keung of the district court said that even if Ng did not post the messages, he cannot shirk responsibility as the owner and administrator of such a big group for allowing these messages that incite illegal behaviors to exist. Matt Hussey, editorial director of NEAR Protocol (and former editor-in-chief of Decrypt) responded to the news of the Telegram group with “#meIRL.” How to build a private or public channel on Telegram? 4How to customize a Telegram channel?
from us


Telegram RDCLR.DEV
FROM American