DialogElement
The HTMLDialogElement interface provides methods to manipulate <dialog> elements.
It inherits properties and methods from the HTMLElement interface.
See:
Instance Members
open: BoolA Boolean reflecting the open HTML attribute, indicating whether the dialog is available for interaction.
returnValue: StringA DOMString that sets or returns the return value for the dialog.
Closes the dialog.
An optional DOMString may be passed as an argument, updating the returnValue of the the dialog.
| Name | Type | Default |
|---|---|---|
returnValue |
String | (optional) |
show(): VoidDisplays the dialog modelessly, i.e. still allowing interaction with content outside of the dialog.
showModal(): VoidDisplays the dialog as a modal, over the top of any other dialogs that might be present. Interaction outside the dialog is blocked.