close

fun close(returnValue: String = definedExternally)(source)

The close() method of the HTMLDialogElement interface closes the dialog.

MDN Reference