Home > widget-integration > CountdownTimerModule > getCartDrawerTimerContainer

CountdownTimerModule.getCartDrawerTimerContainer() method

Returns the cart drawer placeholder element for the countdown timer.

Override to change the selector used to locate the timer container inside the cart drawer.

Signature:

protected getCartDrawerTimerContainer(): HTMLElement | null;

Returns:

HTMLElement | null

The placeholder element, or null if the cart drawer is not in the DOM or the placeholder attribute is missing.

Example

Override to use a different container selector:

protected getCartDrawerTimerContainer() {
  return document.querySelector<HTMLElement>('.custom-cart [data-timer-slot]');
}