Isn't this literally how it's done with every browser on earth? I'm using Linux. Websites don't use DBus and notify-send, they use native Web APIs to talk with the browser. The browser then uses the OS notifications API to translate them, and yes, it manages all the subscriptions too.