Reputation: 840
Inside chrome-extension://<EXTENSION_ID>/hello.html
, the following code:
<script> alert("hi"); </script>
JS does not work? How to make it work?
Upvotes: 0
Views: 494
Reputation: 77482
You cannot use inline JavaScript in a Chrome extension as per enforced Content Security Policy.
You will need to get rid of it, by placing it in an external JS file.
Upvotes: 1