MCPcopy
hub / github.com/zen-browser/desktop / activeTabs

Method activeTabs

src/zen/folders/ZenFolder.mjs:224–248  ·  view source on GitHub ↗
(tabs)

Source from the content-addressed store, hash-verified

222 }
223
224 set activeTabs(tabs) {
225 if (tabs.length) {
226 this._activeTabs = tabs;
227 for (let tab of tabs) {
228 tab.setAttribute("folder-active", "true");
229 }
230 } else {
231 const folders = new Map();
232 for (let tab of this._activeTabs) {
233 const group = tab?.group?.hasAttribute("split-view-group")
234 ? tab?.group?.group
235 : tab?.group;
236 if (!folders.has(group?.id)) {
237 folders.set(group?.id, group?.activeGroups?.at(-1));
238 }
239 let activeGroup = folders.get(group?.id);
240 if (!activeGroup) {
241 tab.removeAttribute("folder-active");
242 tab.style.removeProperty("--zen-folder-indent");
243 }
244 }
245 this._activeTabs = [];
246 folders.clear();
247 }
248 }
249
250 get activeTabs() {
251 return this._activeTabs;

Callers

nothing calls this directly

Calls 8

hasAttributeMethod · 0.80
removePropertyMethod · 0.80
setAttributeMethod · 0.65
hasMethod · 0.65
setMethod · 0.65
getMethod · 0.65
removeAttributeMethod · 0.65
clearMethod · 0.65

Tested by

no test coverage detected