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

Function forceClose

web/pgadmin/static/js/custom_hooks.js:255–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253 }, []);
254
255 function forceClose() {
256 if(getBrowser().name == 'Electron' && isNewTab) {
257 window.removeEventListener('beforeunload', onBeforeUnloadElectron);
258 // somehow window.close was not working may becuase the removeEventListener
259 // was not completely executed. Add timeout.
260 setTimeout(()=>window.close(), 50);
261 } else {
262 closePanel?.();
263 }
264 }
265
266 useEffect(()=>{
267 if(getBrowser().name == 'Electron' && isNewTab) {

Callers 2

QueryToolComponentFunction · 0.85
BrowserComponentFunction · 0.85

Calls 2

getBrowserFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected