What is Nostr?
Scott Jehl /
npub133e…rqrd
2024-06-26 15:34:38

Scott Jehl on Nostr: A nice series of replies today has led me to feel comfortable about recommending the ...

A nice series of replies today has led me to feel comfortable about recommending the data- prefix for any custom attributes you use on custom elements (web components).
3 nice reasons:
1) no chance of future collisions with standards,
2) clarity that the attribute is not for standard HTML behavior
3) built-in property/attribute syncing for getting and setting with myElement.dataset is really convenient.
Author Public Key
npub133e0khgx56jygttzm705s8l377g7j2zcnuj8e7yn92h59c9keheqe6rqrd