I'm not sure how possible this even is, but it would be nice if possible. When I have a tab that updates its favicon, and has triggered a notification or change, have that tab's favico show up in kde tray, possibly with the option to flash. I have many pinned tabs for different webchats [slack, discord, android messages, facebook messenger, skype, steam, hangouts, etc.] When I get a notification from one of them, and my browser window isn't front and focused, then I may not notice. A flashing task tray icon would get noticed. I know there are some apps (Franz, Rambox) that try to do this, but they don't work very well, I don't get the power of my browser and extensions with them, and they consume a lot of RAM. The browser consumes a lot of RAM too, but most of that is going to be used anyway, because I'm always going to have my browser open for other stuff, so that RAM use is shared.
Slack and others actually use HTML notifications when the window isn't in front. I don't see how a heuristic like this could be done in a feasible (reliable) manner.
I've recently learned that the non-qt applications used libunity in the past to do notification badges, which is what I was thinking without knowing the correct terminology. Windows does it, and a lot of apps used to do it in the past if libunity was installed. I don't know how many still support that? That is, of course, on the task bar, and not in the tray, but the same outcome I'm looking for - a way for website notifications to be easily visible when there are unread messages.
Chromium has the Badging API, but unfortunately it is not supported on Linux: https://chromestatus.com/feature/6068482055602176