Skip to content

Commit f96ea6c

Browse files
author
Benjamin Pasero
committed
web - register beforeunload listener so that there can be others
1 parent 57ddfdd commit f96ea6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/platform/lifecycle/browser/lifecycleService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class BrowserLifecycleService extends AbstractLifecycleService {
2222
}
2323

2424
private registerListeners(): void {
25-
window.onbeforeunload = () => this.beforeUnload();
25+
window.addEventListener('beforeunload', () => this.beforeUnload());
2626
}
2727

2828
private beforeUnload(): string | null {

0 commit comments

Comments
 (0)