()
| 157 | if (notification.loading()) { |
| 158 | elementRef.classList.add("loading"); |
| 159 | const nextFrame = () => { |
| 160 | if (!notification.loading()) { |
| 161 | if (type === "toast") { |
| 162 | this.#hideNotificationToast(notification); |
| 163 | if (typeof notification.onDismiss === "function") { |
| 164 | notification.onDismiss(notification); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | elementRef.classList.remove("loading"); |
| 169 | } else { |
| 170 | requestAnimationFrame(nextFrame); |
| 171 | } |
| 172 | }; |
| 173 | |
| 174 | requestAnimationFrame(nextFrame); |
| 175 | } |