DialogElement
The HTMLDialogElement
interface provides methods to manipulate <dialog>
elements.
It inherits properties and methods from the HTMLElement
interface.
See:
Instance Members
open: Bool
A Boolean
reflecting the open HTML attribute, indicating whether the dialog is available for interaction.
returnValue: String
A 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(): Void
Displays the dialog modelessly, i.e. still allowing interaction with content outside of the dialog.
showModal(): Void
Displays the dialog as a modal, over the top of any other dialogs that might be present. Interaction outside the dialog is blocked.