Chrome扩展程序可以相互沟通吗? [英] Can Chrome extensions communicate with each other?
问题描述
我正在撰写Chrome扩展程序,并希望实现一个接口或api,以便将来由我制作的其他扩展程序可以使用它。最后的效果可能如下:
扩展B调用 extensionA.someMethod(someParameters)
并发送一些数据给扩展A和扩展A可以将一些数据返回给扩展B.
是否有一些方法可以实现它,不仅使用标准方法,还有一些技巧?
http://code.google.com/chrome/extensions/messaging.html 具有关于网页和扩展程序之间的通信的一些详细信息。我不确定,但它可能有助于让两个扩展互相沟通。
I am writing a Chrome extension, and want to implement an interface or api so that other extensions made by me in the future can use it. The final effect may be as below:
Extension B calls extensionA.someMethod(someParameters)
and send some data to extension A, and extension A can return some data to extension B.
Is there some ways to do it, not only using standards method but also some tricks?
http://code.google.com/chrome/extensions/messaging.html has some details on communicating between web pages and extensions. I'm not sure but it might help to have two extensions communicate to each other.
这篇关于Chrome扩展程序可以相互沟通吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!