I’m not sure this is correct. The DOM class HTMLDetailsElement has the `open` property, which you can use to read/write the details element’s state. If you’re using setAttribute/getAttribute just switch to the property.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetails...