I have different behavior on firefox
and chrome
for the bellow code, and i think firefox
is more correct.
firefox
will print on the console
:
<button value="2" class="mdl-button mdl-js-button mdl-button--icon" data-upgraded=",MaterialButton">
while chrome
will print this:
<i class="material-icons">star_border</i>
here is my code:
<button value={props.value} className="mdl-button mdl-js-button mdl-button--icon" onClick={(e) => {
e.preventDefault();
props.onClick(e);
}}>
<i className="material-icons">{props.icon}</i>
</button>
onClick(e) {
console.log(e.target);
}