src/preact/base-element.js
/**
   * Default handler for onError event
   * Displays Fallback / Placeholder. Override to customize.
   * @protected
   */
Default handler for onError event
Displays Fallback / Placeholder. Override to customize.
@protected
Default handler for onError event Displays Fallback / Placeholder . Override to customize . @protected
handleOnError() {
    this.toggleLoading?.(false);
    if (this.getFallback?.()) {
      this.toggleFallback?.(true);
      this.togglePlaceholder?.(false);
    } else {
      this.togglePlaceholder?.(true);
    }
  }
handleOnError ( ) { this . toggleLoading ?. ( false ) ; if ( this . getFallback ?. ( ) ) { this . toggleFallback ?. ( true ) ; this . togglePlaceholder ?. ( false ) ; } else { this . togglePlaceholder ?. ( true ) ; } }
Default handler for onError event
 Displays Fallback / Placeholder.
Default handler for onError event Displays Fallback / Placeholder .
// If the content fails to load and there's a fallback element, display the fallback. // Otherwise, continue displaying the placeholder.