during tabs.executeScript: Cannot access contents of url | chrome extension

extensions/schema_generated_bindings.js:82

Error during tabs.executeScript: Cannot access contents of url “chrome-extension://myextensionId000000000000000/menu.html”. Extension manifest must request permission to access this host.

backgroundからexecuteScriptでローカルファイルのスクリプトを実行できない。

http://code.google.com/p/chromium/issues/detail?id=30756

manifest.jsonのpermissionで設定しているhttp://*/*に入っているURLは以外はダメ。( chrome-extension://的な設定は出来ないので。

出来ないので、menu.html側にイベントリスナーを書いて、backgroundでpostmessageする。

postmessageの記事はこちら
http://blog.bbtune.com/archives/1685/message-passing-chrome-extension

This entry was posted on 日曜日, 4月 8th, 2012 at 7:45 PM and is filed under Chrome Extention. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。