A Chrome extension needs to use the CSP compliant script. The CSP compliant scripts are automatically generated by pub build with the extension dart.precompiled.js
but the HTML file references the non-CSP compliant file by default.
There are plans that a configuration option of the Dart2JS transformer should set the link to the appropriate script file, but this is not yet implemented.
There is also an option csp: true
for the Polymer transformer which must be set when Polymer is used.
EDIT
A transformer was added to chrome.dart which does this automatically on pub build
- will be available soon.