前提・実現したいこと
Chrome拡張機能のBrowser ActionのHTMLに書いたtextareaタグをフォーカスしたときに.select()
で内容をすべて選択できているのですが、エラーが出ます。このエラーがいまいち理解できないので教えてほしいです。
発生している問題・エラーメッセージ
Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
該当のソースコード
JavaScript
1$("#copy").focus(() => { 2 $("#copy").select(); 3})
HTML
1<textarea id="copy" readonly spellcheck="false">text text text</textarea>
試したこと
補足情報(FW/ツールのバージョンなど)
・Google Chrome バージョン: 79.0.3945.88(Official Build) (64 ビット)
・manifest_versionは2です
あなたの回答
tips
プレビュー