【问题标题】:Mathjax in Chrome Packaged AppChrome 打包应用程序中的 Mathjax
【发布时间】:2013-08-21 03:25:41
【问题描述】:

我正在尝试在 Chrome 打包应用程序中使用 MathJax。 它根本没有加载,出现以下错误:

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:".

我怎样才能让它工作?

编辑

IT 显示这条线是库中的问题

var CONSTRUCTOR = function () {
    return new Function ("return arguments.callee.Init.call(this,arguments)");

【问题讨论】:

    标签: google-chrome-app mathjax content-security-policy


    【解决方案1】:

    打包应用中不允许使用 eval 和 new 函数,这需要一套严格的内容安全策略。有关详细信息,请参阅文档 Comply with CSP

    该页面链接到几个不同的解决方案,最有可能的是使用sandboxing

    【讨论】:

      猜你喜欢
      • 2012-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-04
      • 2013-04-30
      • 1970-01-01
      相关资源
      最近更新 更多