Some time ago in Apache Flex project we have started to port MDL library into FlexJS framework. [1]
When I was working on Toast component I have faced an issue where removing "mdl-snackbar__action" button from HTML cause an error. It seems that snackbar.js [2] throws an error if snackbar action doesn't exists.
if (!this.actionElement_) {
throw new Error('There must be an action element for a snackbar.');
}
My question is - Why this element is required in case of Toast ? Toast component do not need it.
[1] https://cwiki.apache.org/confluence/display/FLEX/Table+Of+Components
[2] https://github.com/google/material-design-lite/blob/release/src/snackbar/snackbar.js
Thanks, Piotr