Chrome app , javascript issue -


in chrome app have js/files.js being loading in index.html , others html.

i using:

 "app": {     "launch": {       "local_path": "index.html",       "width":800,         "height":800      }   }, 

but deprecated , going removed webstore chrome month.

i've changed recommend, :

"app": { "background": { "scripts": ["main.js"] } }, 

and there calling index.html when i've made change , javascript did not work anymore. can't figure out happening. i've tried , read every kind of issue chrome app , javascript files, cant run simple function like:

 var index = {  initialize: function () {             settimeout(function () {         var user = null;          if (user == null) {             window.location.href = "login.html";         } else {             //do more         }     }, 500); }  }; index.initialize(); 

from js file

there unbalanced(extra) } in snippet

"app": { "background": { "scripts": ["main.js"] } } }, 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -