confirmDiscardChanges()
confirmDiscardChanges(
editors,options?):Promise<boolean>
Defined in: js-api/src/ui/domains/domains-editor.ts:1373
THE gate an app puts in front of a rebuild: resolves to whether the caller may proceed, having saved or discarded whatever was pending.
- nothing dirty — proceeds silently, no dialog;
- a save in flight — refuses (an editor is closed while its transaction runs,
and prompting would offer a save that cannot be taken); the caller may retry
after
onSavingChanged; - otherwise it prompts and applies the answer:
savewrites every pending batch (a FAILED save cancels the navigation — the user keeps their changes and the error),discarddrops them,cancelstays.
Parameters
| Parameter | Type |
|---|---|
editors | DomainFrameEditor[] |
options? | UnsavedPromptOptions |
Returns
Promise<boolean>