apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.13k stars 230 forks source link

Add support to close notification from a child element of "toast-close" #44

Closed t12ung closed 4 years ago

t12ung commented 4 years ago
apvarun commented 4 years ago

@t12ung Thanks for the PR. I understand your problem here. Looking back at the code, I think it's better to do this.removeElement(this.toastElement); as we already have an element reference and avoids the unnecessary parent element computation. What do you think?

t12ung commented 4 years ago

Yes, of course. That would be much more efficient. I've updated the code for this PR.