On 2013-05-07, at 11:36 AM, [email protected] wrote:

> Hello,
> 
> I am a member of a team in charge of building a packaged Firefox OS 
> application. 
> The application uses the AngularJS framework and its packaged inside a Zip 
> file.
> 
> I added the Angular Directive ng-csp to the body of my application:
> 
> <body ng-app="the-app" ng-csp>
> 
> The Error is the following:
> 
> //
> ///

I think the core of the issue is this:

> 05-07 19:31:13.912: ERROR/GeckoConsole(1397): [JavaScript Warning: "CSP WARN: 
>  Directive eval script base restriction violated" {file: 
> "app://788ceebd-a9b7-4a98-a8b0-1ff248e40f52/scripts/vendor/d10639ae.angular.js"
>  line: 6337 column: 0 source: "call to eval() or related function blocked by 
> CSP"}]

Firefox OS applications run with a pretty strict Content Security Policy. One 
of the things that apps are not allowed to do is use the JavaScript eval() 
function.

My guess is that Angular.JS uses eval() for doing its magic. If that is a hard 
requirement of Angular.JS then you can not use it to build Packaged Privileged 
Firefox OS applications.

Can anyone confirm?

 S.


_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to