zachleat.com is one of the many independent Mastodon servers you can use to participate in the fediverse.

Server stats:

1
active users

@zachleat question, that I don't think quit think warrants a github issue/qusetion: why use the `on:x` attribute pattern over something like `data-on-condition`? Just curious.

Zach Leatherman :11ty:

@rem I don’t believe `data-` is required for custom elements so just a style preference

@zachleat @rem that’s also my understanding. HTML spec will never ship a tag name with a hyphen, so there will never be a clash with an attribute _unless_ you use one that HTMLElement has like “name” or “role”.

@d @rem although certain conflicts *could* arise if new attributes are added—hmm. Thinking I might need to test how conflicts work

@zachleat @rem agreed. I think custom namespaces may still be best. And data- is certainly fine to use.