Home > widget-integration > CountdownTimerController > destroy

CountdownTimerController.destroy() method

Stop the tick interval and release all internal references.

Called automatically by . Can also be called directly to clean up without hiding the element.

Signature:

destroy(): void;

Returns:

void

Example

Override to dispatch a custom event on teardown:

destroy() {
  this.element?.dispatchEvent(new CustomEvent('countdown:destroyed'));
  super.destroy();
}