-
Notifications
You must be signed in to change notification settings - Fork 48
Great question.
registerProtocolHandler is designed to handle cases where there is a specific type of application that needs to be launched, commonly via an anchor or form, for instance "mailto://". When a user launches a link with mailto defined it will open the registered native application or web application.
We don't think this goes quite far enough, the protocol handlers have no concept of what data will be presented to the launched application; what happens when the opened application can't handle the data? how do you send an image to an app? There is no way to communicate data back to the calling application. Web Intents solves both of these problems.
Web Intents uses a filter mechanism to let applications register the commands that they wish to handle and also the data-types that they can support.
Good question.
The answer is very similar to the problems that navigator.registerProtocolHandler suffers from. It's primary uses case is for registering the browser as a handler for a type of file data, it doesn't provide context as to the action's it can perform on those files.
Simple. The two afore-mentioned API's are designed to work in isolation. We believe the solution lies somewhere in between combining both intent and data.