I've been working with some data attributes in Javascript recently. I have been using element.dataset.foo = "bar" and element.setAttribute("data-foo","bar") interchangeably. I've heard that generally setAttribute is more reliable and that using an attribute is faster, but is that still the case with these somewhat nonstandard attributes?