<html>
<body>
<h1>The HTML Dialog Object</h1>
<h2>The open Property</h2>
<p>Click the button to find out if the dialog window is open.</p>
<button onclick="myFunction()">Try it</button>
<dialog id="myDialog" open>This is an open dialog window</dialog>
<p id="demo"></p>
<script>
function myFunction() {
let x = document.getElementById("myDialog").open;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>