chromium/third_party/blink/web_tests/html/details_summary/details-open-javascript.html

<details id="details1">
    <summary>details1</summary>
    <input>
</details>

<details id="details2" open>
    <summary>details2</summary>
    <input>
</details>

<script>
document.getElementById("details1").open = true;
document.getElementById("details2").open = false;
</script>