in website/css/mdl/material.js [2225:2253]
MaterialSnackbar.prototype.showSnackbar = function (data) {
if (data === undefined) {
throw new Error('Please provide a data object with at least a message to display.');
}
if (data['message'] === undefined) {
throw new Error('Please provide a message to be displayed.');
}
if (data['actionHandler'] && !data['actionText']) {
throw new Error('Please provide action text with the handler.');
}
if (this.active) {
this.queuedNotifications_.push(data);
} else {
this.active = true;
this.message_ = data['message'];
if (data['timeout']) {
this.timeout_ = data['timeout'];
} else {
this.timeout_ = 8000;
}
if (data['actionHandler']) {
this.actionHandler_ = data['actionHandler'];
}
if (data['actionText']) {
this.actionText_ = data['actionText'];
}
this.createSnackbar_();
}
};