MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / TabClose

Function TabClose

src/background/utils/tabs.js:178–181  ·  view source on GitHub ↗

@return {void}

({ id } = {}, src)

Source from the content-addressed store, hash-verified

176 },
177 /** @return {void} */
178 TabClose({ id } = {}, src) {
179 const tabId = id || src?.tab?.id;
180 if (tabId >= 0) browser.tabs.remove(tabId);
181 },
182 TabFocus(_, src) {
183 browser.tabs.update(src.tab.id, { active: true }).catch(noop);
184 browserWindows?.update(src.tab[kWindowId], { focused: true }).catch(noop);

Callers

nothing calls this directly

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected