The four tests check the four ways of specifying a <details> tag is open or closed.
Support for 2 and 3 vary, even within browsers which natively support <details>.
The important thing is that tests 1 and 4 pass.
Supportive Chrome and Safari treat this like <details open="open">
Don't use this
<details open>
Unsupportive FireFox and Internet Explorer change this to <details open="">
Don't use this
<details>
No specification defaults to closed
Do use this for closed <details>
The fifth test demonstrates how details_shim() interacts with existing onclick handlers.
Additionally, These buttons test altering the open state via JavaScript
Test 1: should be open ... AND IT IS!Test 2: should be closed ... BUT IT ISN'T!Test 3: should be open ... AND IT IS!Test 4: should be closed ... BUT IT ISN'T!Test 5: should alert on click ...
BUT DID IT?