mlcheng / js-toast

A small JavaScript library that displays toast messages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't remove Toast from DOM after it's finished; reuse it

mlcheng opened this issue · comments

When the Toast slides away, the current method to handle it is to remove it from the DOM. However, this causes it to have to recreate the Toast stage every time a Toast is needed. Maybe instead of removing the Toast stage from the DOM, just remove it from the view, and then reuse it after.