Initializing toasts in bootstrap-4 was as easy as: $('.toast').toast(option);
Now as bootstrap-5 dropped jquery support, the require a different initialization approach:
var toastElList = [].slice.call(document.querySelectorAll('.toast'));
var toastList = toastElList.map(function (toastEl) {
return new bootstrap.Toast(toastEl, option)
});
But there is hardly any documentation about it.
Means: what is option here? And what should we do with the resulting toastList?