I'm rather new to Javascript and web-side programming as a whole.
However I would like to know how to create a widget that keeps a list of the X (e.g. 10,50,100, ...) most recent incoming toastr notifications. I found out how to display the notifications, keep them from disappearing etc. Of course, the widget doesn't automatically create a scroll bar when the list of notifications grows larger than the widget size (see image).
My actual question is twofold:
1) I'd like to find a way to have a scrollbar in the widget that allows a user to see the full list of notifications, even those that don't appear on screen.
2) Does anybody know if it is possible to keep only a specified amount of most recent notifications in this widget (i.e. a list of size X that can be appended with the most recent notif and where the least recent notif can be popped from and removed from the screen?)
As said I am working with toastr for notifications, so a related solution would be great, but I appreciate any flow of new ideas.
edit. the toastr notifications are contained within an iFrame. I've tried changing the iframe so that it would show a scrollbar whenever the notifs would go out of the frame.
style="overflow: scroll;"
but this doesn't work.