Dmi*_*dov 1 eval google-chrome-extension angularjs
Laular AngularJS(1.3 beta 19)使用eval.这在铬镀铬中是禁止的.
如何解决问题而不允许进行贬值?
错误信息:
拒绝将字符串评估为JavaScript,因为"unsafe-eval"不是以下内容安全策略指令中允许的脚本源:"script-src'self'chrome-extension-resource:".
堆栈跟踪:
angular.js:1011
csp angular.js:1011
(anonymous function) angular.js:23556
Run Code Online (Sandbox Code Playgroud)
更新:请参阅https://docs.angularjs.org/api/ng/directive/ngCsp的文档ng-csp
OUTDATED:看起来AngularJS无法在chrome扩展中检测到CSP.使用显式ng-csp.链接到AngularJS问题:https://github.com/angular/angular.js/issues/8777
| 归档时间: |
|
| 查看次数: |
1872 次 |
| 最近记录: |