Browser plugin which can register its own protocol

别等时光非礼了梦想. 提交于 2020-01-05 17:37:10

问题


I need to implement a browser plugin which can register its own protocol (like someprotocol://someurl) and be able to handle calls to this protocol (like user clicking on 'someprotocol' link calls function inside my plugin). As far as I understand, Skype does something similar, except I need to handle links within page context and not in a separate app. Any advice on how this can be done? Can this be done without installing my own plugin, with the help of flash/java?


回答1:


Things are going to be slightly more complicated than you think.

You're going to have to create an entire application, not just a browser plugin (that plugin can be part of your application). The reason I consider it to be a complete application is that you're going to need to modify registry settings on the client machine to register your custom URL handler.

Here's an MSDN article describing exactly what you have to do to register the custom URL handler on a Windows client:

Registering an Application to a URL Protocol



来源:https://stackoverflow.com/questions/2767569/browser-plugin-which-can-register-its-own-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!