X 归档 2021-04-12
#webcomponents tip of the day:
Have a custom element class and need to get its tag name? Instantiate the class then read the `tagName` property:
#html #javascript #customelements
Thanks @jpzwarte for the inspiration!
Have a custom element class and need to get its tag name? Instantiate the class then read the `tagName` property:
#html #javascript #customelements
Thanks @jpzwarte for the inspiration!
今日 #webcomponents 小技巧:
有一个自定义元素类,需要获取它的标签名?实例化这个类,然后读取 `tagName` 属性:
#html #javascript #customelements
感谢 @jpzwarte 提供的灵感!
有一个自定义元素类,需要获取它的标签名?实例化这个类,然后读取 `tagName` 属性:
#html #javascript #customelements
感谢 @jpzwarte 提供的灵感!

