Presently, this is the code I am working with using Javascript and Vue.js.
I have an array called Messages.length that contains messages. When the x button is clicked, it triggers the "clearMessages(item)" function on the server side. However, I also aim to create a feature that automatically calls this function if the notification stays visible for more than 10 seconds.
<div v-if="messages.length">
<div class="notification is-success">
<p v-for="item in messages">{{ item }}</p>
<a @click="clearMessage(item)" class="delete"></a>
</div>
</div>