f3oall / awesome-notifications

Lightweight JavaScript Notifications Library
https://f3oall.github.io/awesome-notifications/
MIT License
292 stars 40 forks source link

Add ability to trigger the notification deleted via add a deleted event to the notification Element on delete function invoked. #51

Open peter-fan-cn opened 3 years ago

peter-fan-cn commented 3 years ago

add the deleted event to the element on deleted. usage:

let modal = new AWN().modal('<b>Custom modal window message</b>')
modal.addEvent('deleted', event=>{
   window.location.reload();
})