I think that idea was the concept behind WebIntents/WebActivities, which were explored by the Chrome team and by Mozilla. Efforts seem to have stalled, though.
Ya this looks like it could've definitely fit the bill. Too bad it never took off. And worse yet, both major browsers tried their own version and neither took off.
This just seems so easy an idea to get on board with, like VSCode solving the n-to-1 problem with their language server api. I don't understand why it fizzled out.