Q: Set notifications time in google firebase Is there a way to specify the time i want the notification to be on the screen? Or just leave it be until its closed. This is the code:
    self.addEventListener('notificationclick', function(event) {
    //console.log('[Service Worker] Notification click Received.');

    var url = event.notification.data.url;

    //console.log('[Service Worker] event url = ' + url );
    //console.log(event);

    event.notification.close();

    // ensure the browser doesn't terminate our service worker before our new window has been displayed.
    event.waitUntil(
        clients.openWindow( url )
    );
});


A: You can't control the time.
But you can use requireInteraction flag to make notification permanent (until click).
More info: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification
