solid
solid copied to clipboard
[solid-js/html] `attr:foo="123"` in `html` template outputs as verbatim `attr:foo="123"`, inconsistent with JSX
Describe the bug
This JSX code,
function Example() {
return <some-el attr:foo="123">inspect element</some-el>
}
outputs the attribute foo="123"
to the DOM, as expected.
This html
template,
function Example() {
return html`<some-el attr:foo="123">inspect element</some-el>`
}
outputs verbatim attr:foo="123"
to the DOM.
Your Example Website or App
https://playground.solidjs.com/anonymous/3f8870fa-ecb7-4222-b81c-abec2a56b6b3
Steps to Reproduce the Bug or Issue
see playground
Expected behavior
Expect behavior to be consistent across JSX and html
.
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
It seems the html takes whatever you put into the dom. Should we use the standard html here? in you case, remove the attr, use html <some-el foo="123">inspect element</some-el>
?
Yeah this just was never added probably. HTML renderer was something I created a couple days back in 2018 (I think) and over time got updates because the runtime improved. We probably should look at adding this.