From the Chrome extension CSP docs:
Inline JavaScript will not be executed. This restriction bans both inline
blocks and inline event handlers (e.g.
).
You cannot have inline scripts in your extension HTML like:
Rather, you must place your script into a separate file: