As far as I know, there is no easy workaround. webapp invokes notifications by itself though, to detect that event, I think there is no other way than Notification() constructor. The largest reason to extend Notification is that.
If it's missing, the app can't activate the main window when a notification is clicked (by design of electron), also can't switch tabs to the server which invoked the notification. If there is a way to hook notification.onclick, it would be a workaround.
On the other hand, by adding another websocket connection, the app can know that new messages have arrived. In that case, the app would be able to invoke notification by itself. However we would need to add a mechanism to suppress notifications in webapp.