mlcheng / js-toast

A small JavaScript library that displays toast messages
MIT License
54 stars 19 forks source link

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

Open mlcheng opened 9 years ago

mlcheng commented 9 years ago

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.