[英]Dojo and Chrome Extensions
I am wondering, is there a possibility to use Dojo in order to create chrome extensions? 我想知道,是否有可能使用Dojo来创建chrome扩展?
I've been searching for a quite a while, and it seems like there was some way before manifest_version 2. After that, I couldnt find anything more or less helpful. 我已经搜索了很长一段时间,似乎manifest_version 2之前还有一些方法。在那之后,我发现或多或少没有任何帮助。
Thank you in advance! 先感谢您!
I found this on google: https://github.com/cesine/todomvc-for-chrome-extensions/issues/7 我在Google上找到了这个: https : //github.com/cesine/todomvc-for-chrome-extensions/issues/7
for records: 记录:
It looks like dojo really does depends on eval (as of today Oct 26 2012)
看来dojo确实确实取决于eval(截至2012年10月26日)
http://dojo-toolkit.33424.n3.nabble.com/Chrome-extensions-manifest-version-2-problem-td3989459.html
http://dojo-toolkit.33424.n3.nabble.com/Chrome-extensions-manifest-version-2-problem-td3989459.html
Line 15:
var _41 = new Function("__text", "return eval(__text);");
第15行:
var _41 = new Function("__text", "return eval(__text);");
The solution:
解决方案:
Change the content security policy to use 'unsafe-eval' which after a great deal of lobbying by developers is now allowed as of September 7 2012
将内容安全政策更改为使用“不安全评估”,直到2012年9月7日,开发人员进行了大量游说后,现在才允许使用
There might be a fix of dojo CSP issue in Chrome extensions available in few weeks in Dojo version 1.11: https://bugs.dojotoolkit.org/ticket/15950 在几周内即可在Dojo版本1.11中使用Chrome扩展程序中的dojo CSP问题修复: https : //bugs.dojotoolkit.org/ticket/15950
'has("csp=restrictions")' was added for non-csp compliant code. 为非csp兼容代码添加了“ has(“ csp = restrictions”)”。 Please set this feature test to true in order to run code that must be csp compliant.
请将此功能测试设置为true,以运行必须符合csp的代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.