MCPcopy
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / open

Method open

assets/js/slider.js:56–67  ·  view source on GitHub ↗
(pushbarId)

Source from the content-addressed store, hash-verified

54 }
55
56 open(pushbarId) {
57 if (this.activeId === String(pushbarId) || !pushbarId) return;
58 if (this.activeId && this.activeId !== String(pushbarId)) this.close();
59 this.activeId = pushbarId
60 this.activeElement = document.querySelector(`[data-pushbar-id="${this.activeId}"]`)
61 if (!this.activeElement) return;
62 this.emitOpening();
63 this.activeElement.classList.add('opened');
64 const pageRootElement = document.querySelector('html')
65 pageRootElement.classList.add('pushbar_locked');
66 pageRootElement.setAttribute('pushbar', pushbarId)
67 }
68
69 close() {
70 if (!this.activeId) return;

Callers 15

handleOpenEventMethod · 0.95
showPreviewFunction · 0.80
isOnlineFunction · 0.80
tweetNowFunction · 0.80
worldclock.jsFile · 0.80
queryApiFunction · 0.80
Sudoku_Solver.jsFile · 0.80
space-wrap.jsFile · 0.80
datguiFunction · 0.80
three.min.jsFile · 0.80
pdFunction · 0.80

Calls 2

closeMethod · 0.95
emitOpeningMethod · 0.95

Tested by

no test coverage detected