autotune
autotune copied to clipboard
use <auto-tune> instead of <autotune>
Sorry for a pretty bike-shedding ticket, but a small improvement would be to use <auto-tune>
instead of <autotune>
. The latter is an unknown html element and thus invalid, but the former is a custom element, so compliant :)
Interesting! Would you mind making a PR?
Maybe autotune-experiments>
? I don't want to hyphenate "autotune."
PR is no problem! autotune-experiments
is pretty long though? A somewhat default for custom elements is to prepend them with x-
to work around this, that would make it <x-autotune>
(e.g. https://x-tag.github.io/) or maybe <autotune-block>
? Your call ;)
Additionally, maybe prefix the autotune attributes (autotune
and autotune-class
) with data-
to make them custom attributes.
Edit: You already do! Then just lead with that in the README.
What is the consequence of using invalid tags? I don't like that we're doing it but it's so easy to read!
x-autotune
looks great.
No real consequences. Validators and strict parsers will complain, browsers will happily accept unknown elements. Same for attributes.
But, with custom element you could add more behaviour directly to the element using the custom elements api, potentially offloading a bunch of your code to browser native stuff. With custom attributes, you can use browser api's like dataset to make your live as a developer easier.
one PR for x-autotune
coming up :)