The Spicy Web on Nostr: This is cool…down the road if you need to get the tag name of a defined custom ...
This is cool…down the road if you need to get the tag name of a defined custom element, you'll be able to use customElements.getName. For example:
```js
customElements.getName(MyGroovyElement)
// would return my-groovy-element
```
It's landed in Safari TP, other browsers to follow. See:
https://github.com/whatwg/html/pull/9195#WebComponents #HTML
Published at
2023-05-15 16:15:10Event JSON
{
"id": "d29f3d844a73a8c297f0ce0a476e6e99d8d17d5c23cf867cd96d3d5b6cc178a3",
"pubkey": "e66adfa081ffa9df2f6cda2075a77cfcb103fbd4fa9e0e3e49dc52d32e6841b5",
"created_at": 1684167310,
"kind": 1,
"tags": [
[
"t",
"webcomponents"
],
[
"t",
"html"
],
[
"mostr",
"https://social.spicyweb.dev/users/vanilla/statuses/110373588836774750"
]
],
"content": "This is cool…down the road if you need to get the tag name of a defined custom element, you'll be able to use customElements.getName. For example:\n\n```js\ncustomElements.getName(MyGroovyElement)\n\n// would return my-groovy-element\n```\n\nIt's landed in Safari TP, other browsers to follow. See:\nhttps://github.com/whatwg/html/pull/9195\n\n#WebComponents #HTML",
"sig": "2010339e5470b1eff6cb58f0abbf7692e60cb95d6c289b600eba19328171d2282b169bc6e3c89555cc60062f9aaabc5d7710e0d7f68d82767db4c9943a9f61dc"
}