We are using vue.js
to render logs from live stream as follows:
<tr v-else v-for="log in logs" v-cloak>
<td>{{log.id}}</td>
<td>...</td>
</tr>
We unshift the array with elements from EventSource
like this:
this.eventSource.onmessage = function(log) {
if (log.data) {
vue.logs.unshift(JSON.parse(log.data));
}
};
This is all nice and working. What I would like to do is to highlight the newly inserted elements for 10 seconds with certain colour so that users can see there is something new.