You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the ruby binding for lol_html and would really like to be able to transform <p>Foo</p> into <p data-this-is-special>Foo</p>.
I understand that the lol_html API currently implements Element.html#set_attribute with a String value, but does not yet provide a similar Element#add_attribute-method which writes an attribute without a String value.
Is Element#add_attribute something other ppl are interested in and something someone else would be willing to implement? I myself have no rust knowledge (yet) and would have to depend on someone else to provide the code here :)
The text was updated successfully, but these errors were encountered:
Note that from the perspective of the HTML spec, data-thing and data-thing="" are exactly equivalent.
Absolutely, thanks for clearing that up. My point is that I'll be reading the generated output and <p data-thing>Foo</p> is just easier and quicker to read for me personally than <p data-thing="">Foo</p>.
I'm using the ruby binding for
lol_html
and would really like to be able to transform<p>Foo</p>
into<p data-this-is-special>Foo</p>
.I understand that the
lol_html
API currently implements Element.html#set_attribute with a String value, but does not yet provide a similarElement#add_attribute
-method which writes an attribute without a String value.Is
Element#add_attribute
something other ppl are interested in and something someone else would be willing to implement? I myself have no rust knowledge (yet) and would have to depend on someone else to provide the code here :)The text was updated successfully, but these errors were encountered: