Trying to decipher this code snippet:
$(document).on(
Event.CLICK_DATA_API,
Selector.DISMISS,
Alert._handleDismiss(new Alert()) )
This particular piece is related to the Alert component:
https://github.com/twbs/bootstrap/blob/v4-dev/js/src/alert.js
I am curious about why we are passing a new Alert()
on a click event rather than simply using an instance or letting event.target handle it in the listener.