DOM Methods
HTMLDialogElement.show()
Opens a dialog non-modally. Other document content remains available for interaction. Use showModal for true modality. Calling show on an already open modal dialog can throw InvalidStateError. Example result: true / false.
Formal Syntax & Structure
html syntaxhtml
element.show()Return Value
undefined
No return value.
Working Example
Example Snippethtml
<dialog id="demo" aria-label="Notice"> <button>OK</button></dialog><p> Result: <output id="result"></output></p><script> const e = document.getElementById('demo'); const result = value => { document.getElementById("result").textContent = String(value); }; e.show(); result(e.open+' / '+e.matches(':modal'));</script>Browser Compatibility
Minimum supported versions across modern rendering engines
Widely Available (2022)
Blink
Chrome
37+
Yes
Gecko
Firefox
98+
Yes
WebKit
Safari
15.4+
Yes
Basic feature support; newer dialog members have their own compatibility.
HTML Living Standard