Keep the notification a little longer?

Currently using HTML5 notification API, it works like a charm. Except that I want the notification to stay for at least 10 seconds because there is pretty text inside it.

I read something about re-creating a notification when it was destroyed and it was not entered by the user (e.g. notification is destroyed due to timeout, BAM, resend). Though it seems like I overdid it a bit for what I want, and a bit hackish too. Is there an easy way to keep my notification for a few seconds?

+3


source to share


1 answer


There is really no way to achieve such a goal, at least for Firefox and Safari. This is part of the implementation of the standard that defines the notification API. Although it is possible in Chrome, because Chrome does not automatically close the notification, so you need to declare a timeout to close it. This timeout can be as long as you want.



It looks like the notification API could be improved.

+2


source







All Articles