我试图让一个页面使用chrome.extension.connect与扩展对话,但是chrome.extension对象不可用。chrome.extensions对象不可用
如果我CONSOLE.LOG(铬),我得到一个对象:
app
appNotifications
csi
loadTimes
searchBox
setSuggestResult
webstore
但没有扩展名。
我需要做些什么来实现这一点吗?或者任何它不可用的原因?使用Chrome 20在OSX 10.7
“页面与扩展对话”。页面不能直接与扩展进行通信。该扩展必须使用内容脚本实现此功能。对于灵感/示例代码,请参阅[本堆栈溢出答案](http://stackoverflow.com/questions/9602022/chrome-extension-retrieving-gmails-original-message/9636008#9636008)。更具体地说 - – 2012-07-22 21:33:54