开发者

Is it possible to interact with a local application in a Google Chrome extension?

I 开发者_如何学Chave begun using Google Chrome as a primary browser, but I miss my Evernote extension, which can clip a web page directly to the local Evernote application. Is it possible for me to write an extension in Chrome that can do this?


Yes it is possible, through NPAPI, but your local application should be prepared for external communication. Code running in an NPAPI plugin has the full permissions of the current user and is not sandboxed or shielded from malicious input by Google Chrome in any way.

All this is described here: http://code.google.com/chrome/extensions/npapi.html


To avoid the NPAPI way, another idea would be to communicate with a custom local http server binded to localhost and send requests to it.

Disclaimer: Never tried it but theoretically it should work.


I don't think chrome allows this, simply because it would be dangerous to let plugins have extended priviledges, they even run in an extra, low-rights thread and only communicate with chrome itself through pipes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜