Push notifications in Desktop Browsers via service workers & WebPush API.
When using Telegram Web in Firefox, I noticed that I received Push notifications without the site open. Upon search, found that, it registered a service worker and used Mozilla Push API service to fetch notifications.
Source : https://support.mozilla.org/en-US/kb/push-notifications-firefox
Similar is possible with FCM in Chromium.
Please use these workers to push notifications in Desktop browsers. Can be handy when not using Desktop clients and saves memory where the user doesn't need to have the tab open always.
P.S. It should not expose any metadata such as Email address or Subject line. Only that new email received.
If you are exposing it, the implementation should be E2E encrypted so that both email address and subject line is not exposed to the push service by using Web Push Encryption (RFC 8291) scheme correctly.