Chrome拡張機能を開発しています。私のmanifest.jsonは次のとおりです。
"page_action": {
"default_icon": {
"19": "icons/icon19.png",
"38": "icons/icon38.jpg"
},
"default_popup": "options.html"
},
私の拡張機能では、実際のWebページで実行/到達しようとするスクリプトを実行しようとしています。
// in options.html
chrome.tabs.executescript(null,{code:"alert('hello!');"}) ;
しかし、Chrome拡張デバッガーはこのエラーを出力します:
Uncaught TypeError: Object #<Object> has no method 'executescript'
content_scriptまたは実際のWebページのオプションの変更をすぐに反映したいと思います。
page_actionスコープで、「chrome」オブジェクトに到達するにはどうすればよいですか?