Get value from dialog

Hi, I have create a dialog, and now I want to get the return value, I find dialog.close(name.value); can return value. Is there any other way to get a return value without closing dialog? Thanks.

What’s the use case? for modal dialogs, a promise is returned when the dialog closes.