chore(react/type_widgets): save on window closing

This commit is contained in:
Elian Doran
2025-10-05 18:06:48 +03:00
parent 0dcaa8719f
commit 6ffe8a2eb5
4 changed files with 15 additions and 23 deletions

View File

@@ -668,6 +668,10 @@ export class AppContext extends Component {
this.beforeUnloadListeners.push(obj);
}
}
removeBeforeUnloadListener(listener: (() => boolean)) {
this.beforeUnloadListeners = this.beforeUnloadListeners.filter(l => l === listener);
}
}
const appContext = new AppContext(window.glob.isMainWindow);