Every line of 'destroy session on browser tab close javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
226 function closeWindow(sessionId, sessionType){ 227 let sessLocalId = sessionId + "_" + sessionType; 228 if (SessObjMap.get(sessLocalId)){ 229 SessObjMap.get(sessLocalId).close(); 230 } 231 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
94 async function closeSaka(tab) { 95 if (tab) { 96 if (tab.url === browser.runtime.getURL('saka.html')) { 97 await browser.tabs.remove(tab.id); 98 } else { 99 await browser.tabs.executeScript(tab.id, { 100 file: '/toggle_saka.js', 101 runAt: 'document_start', 102 matchAboutBlank: true 103 }); 104 } 105 } 106 }
256 function destoryTabWorker(tabId) { 257 if (trackingTabWorkers.hasOwnProperty(tabId)) { 258 trackingTabWorkers[tabId].destroy(); 259 } 260 }
58 function closeTest(browser, callback) { 59 browser.testComplete(callback); 60 }
24 destroy (): void { 25 this.session.gracefullyDestroy() 26 }
254 async close() { 255 await this._closeCallback.call(null); 256 this.disconnect(); 257 }
104 async closeCurrentTab() { 105 await this.driver.close(); 106 return this; 107 }
89 close(): void { 90 // FIXME: executing `sleep 5 && exit` and switching to another session will close an incorrect one. 91 this.application.closeFocusedSession(); 92 }
16 function closeTab(tabId) { 17 chrome.tabs.remove(tabId); 18 }
125 async close() { 126 const launchPromise = this._launchPromise; 127 if (launchPromise) { 128 this._launchPromise = undefined; 129 const browser = await launchPromise; 130 await browser.close(); 131 } 132 }