Experimenting with using Element.animate()
to adjust the background-color
in order to replicate a refresh effect.
Snippet of Code:
const changeColorOnPage = (id) => {
document.getElementById(id).animate(
[
{"background-color": '#def', color: '#def'},
], {
easing: 'ease-in-out',
duration: 200
});
}
During testing, altering the color
works as intended, however, changing the background-color
does not. How can this issue be resolved?