MCPcopy Create free account
hub / github.com/ampproject/amphtml / removeTab

Function removeTab

validator/js/chromeextension/worker.js:315–321  ·  view source on GitHub ↗

* Remove the URL from storage when the tab is closed.

(tabId)

Source from the content-addressed store, hash-verified

313 * Remove the URL from storage when the tab is closed.
314 */
315function removeTab(tabId) {
316 chrome.tabs.get(tabId, tab => {
317 if (!chrome.runtime.lastError) {
318 chrome.storage.session.remove(tab.url);
319 }
320 });
321}
322
323/**
324 * Listen for a new tab being created.

Callers 1

worker.jsFile · 0.85

Calls 2

getMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected