This could now be `$dlg = dialog.getElement()`