Add open attribute on details which are supposed to be open by default instead of opening them with JS
This commit is contained in:
parent
9b44c4b29c
commit
6c8969c43c
2 changed files with 2 additions and 4 deletions
|
@ -1305,7 +1305,7 @@ fn render_impl(
|
|||
if let Some(use_absolute) = use_absolute {
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle implementors-toggle\">\
|
||||
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
|
||||
<summary>\
|
||||
<h3 id=\"{}\" class=\"impl\"{}>\
|
||||
<code class=\"in-band\">",
|
||||
|
@ -1334,7 +1334,7 @@ fn render_impl(
|
|||
} else {
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle implementors-toggle\">\
|
||||
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
|
||||
<summary>\
|
||||
<h3 id=\"{}\" class=\"impl\"{}>\
|
||||
<code class=\"in-band\">{}</code>",
|
||||
|
|
|
@ -1429,8 +1429,6 @@ function hideThemeButtonState() {
|
|||
} else if (nextTagName !== "DETAILS") {
|
||||
e.nextElementSibling.style.display = "block";
|
||||
}
|
||||
} else if (e.tagName === "DETAILS") {
|
||||
e.open = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue