@antadesign/anta
    Preparing search index...

    Function installDismissTriggerUnreviewed

    • Install a delegated "dismiss from an action" click handler: any element inside host carrying [attr] runs onDismiss on click, scoped to the nearest host of host's own tag (so a control inside a nested same-tag element doesn't also dismiss the outer one). A read-only light-DOM walk — no host / tree mutation — that catches any activated control (native <button>, <a>, <a-button>, <a-menu-item>) with keyboard activation for free. Shared by a-toast (data-toast-dismiss) and a-banner (data-banner-dismiss), mirroring a-dialog's data-dialog-close family; keep the one copy here so a future fix (e.g. skipping [disabled] triggers) lands for every element at once.

      Parameters

      • host: HTMLElement
      • attr: string
      • onDismiss: () => void

      Returns void