1 decade ago by krzysztofjankowski
I'm making a game for Firefox OS. I use the manifest validator: https://marketplace.firefox.com/developers/validator
I mange to get 0 errors but there is 5 warnings that validate CSP (content security policy) with is https://developer.mozilla.org/Apps/CSP
Here are what Mozilla highlighted:
Can we somehow fix this? It's not critical but since ImpactJS runs so good on Firefox OS phones (Alcatel one touch fire) it'll be nice to have this fixed.
p.s. if this don't say anything I could push full sours code to the validator.
I mange to get 0 errors but there is 5 warnings that validate CSP (content security policy) with is https://developer.mozilla.org/Apps/CSP
Here are what Mozilla highlighted:
game.min.js 4 5 6 ... ||function(oThis){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");} ... :document.getElementsByTagName(selector);},$new:function(name){return document.createElement(name);},copy:function(object){if(!object||typeo ... else if(object instanceof Array){var c=[];for(var i=0,l=object.length;i<l;i++){c[i]=ig.copy(object[i]);}
game.min.js 23 24 25 ... "+"Most likely there's a name/path mismatch for one of the listed modules "+"or a previous syntax error prevents a module from loading:\n"+ unresolved.join('\n'));}},_DOMReady:function(){if(!ig.modules['dom.ready'].loaded){if(!document.body){return setTimeout(ig._DOMReady,13);} ig.modules['dom.ready'].loaded=true;ig._waitForOnload--;ig._execModules();}
game.min.js 87 88 89 ... ._volume=v.limit(0,1);for(var i in this.tracks){this.tracks[i].volume=this._volume;}},fadeOut:function(time){if(!this.currentTrack){return;} ... s._fadeInterval);this.fadeTimer=new ig.Timer(time);this._fadeInterval=setInterval(this._fadeStep.bind(this),50);},_fadeStep:function(){var v ... else{this.currentTrack.volume=v;}},_endedCallback:function(){if(this._loop){this.play();}
game.min.js 98 99 100 for(var i=0;i<this.resources.length;i++){this.loadResource(this.resources[i]);} this._intervalId=setInterval(this.draw.bind(this),16);},loadResource:function(res){res.load(this._loadCallbackBound);},end:function(){if(thi ... this.done=true;clearInterval(this._intervalId);ig.system.setGame(this.gameClass);},draw:function(){this._drawStatus+=(this.status-this._draw ...
game.min.js 101 102 else{throw('Failed to load resource: '+path);} this.status=1-(this._unloaded.length/this.resources.length);if(this._unloaded.length==0){setTimeout(this.end.bind(this),250);}}});});
Can we somehow fix this? It's not critical but since ImpactJS runs so good on Firefox OS phones (Alcatel one touch fire) it'll be nice to have this fixed.
p.s. if this don't say anything I could push full sours code to the validator.