toast.js
toast.js copied to clipboard
update or remove an existing toast
It would be useful to have a programmatic way to
- remove an existing (visible) toast before it is clicked or times out, so a new toast can be shown.
- update the content of an existing toast with new information.
Both approaches could achieve the same thing. Initially, I think the remove method would be cleaner but would require a way to track existing toasts before they are removed. The second approach also requires tracking, and may be more user friendly because it maintains the order/stacking of all existing toasts.