fix: ssr respects bool attrs
This commit is contained in:
1 parent
f4132d1874
commit
255f58af63
1 file changed
+30
@@ -187,6 +187,36 @@ impl<'a> TextRenderer<'a, '_> {
|
|||||||
match attr.namespace {
|
match attr.namespace {
|
||||||
None => match attr.name {
|
None => match attr.name {
|
||||||
"dangerous_inner_html" => inner_html = Some(attr.value),
|
"dangerous_inner_html" => inner_html = Some(attr.value),
|
||||||
|
"allowfullscreen"
|
||||||
|
| "allowpaymentrequest"
|
||||||
|
| "async"
|
||||||
|
| "autofocus"
|
||||||
|
| "autoplay"
|
||||||
|
| "checked"
|
||||||
|
| "controls"
|
||||||
|
| "default"
|
||||||
|
| "defer"
|
||||||
|
| "disabled"
|
||||||
|
| "formnovalidate"
|
||||||
|
| "hidden"
|
||||||
|
| "ismap"
|
||||||
|
| "itemscope"
|
||||||
|
| "loop"
|
||||||
|
| "multiple"
|
||||||
|
| "muted"
|
||||||
|
| "nomodule"
|
||||||
|
| "novalidate"
|
||||||
|
| "open"
|
||||||
|
| "playsinline"
|
||||||
|
| "readonly"
|
||||||
|
| "required"
|
||||||
|
| "reversed"
|
||||||
|
| "selected"
|
||||||
|
| "truespeed" => {
|
||||||
|
if attr.value != "false" {
|
||||||
|
write!(f, " {}=\"{}\"", attr.name, attr.value)?
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => write!(f, " {}=\"{}\"", attr.name, attr.value)?,
|
_ => write!(f, " {}=\"{}\"", attr.name, attr.value)?,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user