Home > widget-integration > CartController > getCallbackDelay
CartController.getCallbackDelay() method
Get callback delay for add to cart operations Protected method - override to customize callback timing
Signature:
protected getCallbackDelay(type: "success" | "failure"): number;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
"success" | "failure" |
Type of callback ('success' | 'failure') |
Returns:
number
Delay in milliseconds
Example
// Faster callbacks for responsive UX
protected getCallbackDelay(type: 'success' | 'failure'): number {
return type === 'success' ? 0 : 200;
}