MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / preventUnload

Function preventUnload

runtime/src/js/pgadmin.js:187–190  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

185 const currWin = BrowserWindow.getFocusedWindow();
186
187 const preventUnload = (event) => {
188 event.preventDefault();
189 currWin.webContents.off('will-prevent-unload', preventUnload);
190 };
191 currWin.webContents.on('will-prevent-unload', preventUnload);
192 currWin.webContents.reload();
193}

Callers

nothing calls this directly

Calls 1

offMethod · 0.80

Tested by

no test coverage detected