3 ms·
I avoid all of the kebab/camel conversions by using the methods: Element.hasAttribute('data-thing') Element.getAttribute('data-thing') Element.setAttribute('
by wildrhythms 2y ago
I avoid all of the kebab/camel conversions by using the methods:
Element.hasAttribute('data-thing')
Element.getAttribute('data-thing')
Element.setAttribute('data-thing', '...')
Much more clear what I'm doing without the awkward translating when I inevitably have to inspect/debug in the DOM.