Home > widget-integration > CountdownTimerModule > destroyCartDrawerTimer
CountdownTimerModule.destroyCartDrawerTimer() method
Destroy the active cart drawer countdown timer controller.
Calls destroy() on the stored controller and nulls the reference.
Signature:
protected destroyCartDrawerTimer(): void;
Returns:
void
Example
Override to also clear custom DOM state:
protected destroyCartDrawerTimer() {
super.destroyCartDrawerTimer();
document.querySelector('.cart-timer-badge')?.remove();
}