How to set display duration for Push Notification in javascript?
<p>Here is the code of service worker that listens for the push notification:</p>

<pre><code>self.addEventListener('push', function (event) {
var payload = event.data ? event.data.text() : 'no payload';

event.waitUntil(
        self.registration.showNotification('Notify Message', {
            body: payload,
            icon: 'push.png'
        })   );

});
</code></pre>

<p>I have the push notification coming on my screen when a notification is sent. But i wanted to display the push notification on the screen for a certain time (for example say 90 seconds or some dynamic time duration which user who sends the notification would input). This is not for android or ios. This is desktop level notification. So, how to set the duration for the push notification?</p>

<p>Any kind of help is highly appreciated.
Thanks</p>