minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-04-13 17:56:39 +03:00
parent 372cb1d582
commit dd8b02f0f7
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,6 @@ CACHE MANIFEST
# Last Modified: 2017 Apr 13
CACHE:
simplesnake.html
simplesnake.css
simplesnake.js
simplesnake.html

View File

@ -376,7 +376,8 @@ function setup(snake, timer, size){
document.addEventListener('mousedown', makeTapHandler(snake))
HANDLER_SET = true
if(window.applicationCache){
if(window.applicationCache
&& applicationCache.status != applicationCache.UNCACHED){
applicationCache.update()
applicationCache.addEventListener('updateready', function(){
@ -385,7 +386,7 @@ function setup(snake, timer, size){
applicationCache.swapCache()
location.reload()
}
}
})
}
}