cloudflare / cloudflare/lol-html
Support for `Element::add_attribute`
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the [ruby](https://github.com/gjtorikian/selma) binding for `lol_html` and would really like to be able to transform `
Foo
` into `Foo
`.I understand that the `lol_html` API currently implements [Element.html#set_attribute](https://docs.rs/lol_html/1.2.0/lol_html/html_content/struct.Element.html#method.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 :)
Contributor guide
Research direction
Start by locating the existing Element::set_attribute implementation and the related Element API documentation referenced in the issue. Check how attributes without string values are represented and whether existing tests cover attribute rewriting. Done means the Ruby binding can expose Element#add_attribute and transform the example into an attribute without a value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100