MCPcopy Create free account
hub / github.com/Yorick-Ryu/deep-share / dismissToastNotification

Function dismissToastNotification

scripts/notifications.js:255–280  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

253 }
254
255 function dismissToastNotification(id) {
256 const toastData = activeToasts.get(id);
257 if (!toastData) return false;
258
259 const { element, timeoutId } = toastData;
260
261 if (timeoutId) clearTimeout(timeoutId);
262 activeToasts.delete(id);
263
264 // Add exit animation class
265 element.classList.add('exiting');
266
267 // Remove from DOM after animation
268 element.addEventListener('animationend', () => {
269 if (element.parentNode) {
270 element.parentNode.removeChild(element);
271 }
272 // Cleanup container if empty
273 const container = document.querySelector('.ds-toast-container');
274 if (container && container.children.length === 0) {
275 container.remove();
276 }
277 });
278
279 return true;
280 }
281
282 // --- Export ---
283 window.showToastNotification = showToastNotification;

Callers 1

showToastNotificationFunction · 0.85

Calls 5

deleteMethod · 0.80
removeChildMethod · 0.80
getMethod · 0.45
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected