phoenixwizard
phoenixwizard

Reputation: 5209

Mathjax in Chrome Packaged App

I am trying to use MathJax in Chrome Packaged app. It is not loading at all giving the following error :

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:".

How can I make it work?

EDIT

IT is showing this line to be the problem in the library

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

Upvotes: 3

Views: 700

Answers (1)

Vincent Scheib
Vincent Scheib

Reputation: 18610

eval and new functions are not permitted in packaged apps, which require a strict set of content security policy. See the documentation Comply with CSP for more details.

That page links to a few different solutions, the most likely one being to use sandboxing.

Upvotes: 2

Related Questions