I'm submitting a feature request
Current behavior:
The current interface for open() has a nested promise to allow for cancellation of the dialog and wait for the result.
Expected/desired behavior:
An example of the current proposal for AbortController for the use in fetch() is here:. A similar example for dialog.open() could be:
let controller = new AbortController();
let result = dialog.open<TResult>({/* the usual stuff */,abort: controller.signal})
// To cancel the dialog:
controller.abort();
// Otherwise:
let output = result.output; // is of type TResult
The AbortController is supported in the upcoming releases of Firefox and Edge.