appcache-nanny
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -76,5 +76,6 @@ // appCacheNanny | ||
// | ||
appCacheNanny.check = function check() { | ||
appCacheNanny.update = function update() { | ||
trigger('update'); | ||
if (! setupDone) { | ||
setupCallbacks.push(appCacheNanny.check); | ||
setupCallbacks.push(appCacheNanny.update); | ||
if (! setupPending) { | ||
@@ -94,3 +95,3 @@ setup(); | ||
// the applicationCache became obsolete | ||
appCacheNanny.check = noop; | ||
appCacheNanny.update = noop; | ||
return false; | ||
@@ -119,3 +120,3 @@ } | ||
clearInterval(intervalPointer); | ||
intervalPointer = setInterval(appCacheNanny.check, checkInterval); | ||
intervalPointer = setInterval(appCacheNanny.update, checkInterval); | ||
isCheckingForUpdatesFlag = true; | ||
@@ -214,3 +215,3 @@ trigger('start'); | ||
if (! appCacheNanny.isSupported()) { | ||
appCacheNanny.check = noop; | ||
appCacheNanny.update = noop; | ||
return; | ||
@@ -264,5 +265,5 @@ } | ||
// when browser goes online/offline, trigger check to double check. | ||
addEventListener('online', appCacheNanny.check, false); | ||
addEventListener('offline', appCacheNanny.check, false); | ||
// when browser goes online/offline, look for updates to make sure. | ||
addEventListener('online', appCacheNanny.update, false); | ||
addEventListener('offline', appCacheNanny.update, false); | ||
} | ||
@@ -269,0 +270,0 @@ |
{ | ||
"name": "appcache-nanny", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "Gregor Martynus <gregor@martynus.net>" |
{ | ||
"name": "appcache-nanny", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Teaches the applicationCache douchebag some manners!", | ||
@@ -5,0 +5,0 @@ "main": "appcache-nanny.js", |
@@ -22,3 +22,3 @@ The appCache Nanny | ||
// you can also check for updates at any time | ||
appCacheNanny.check() | ||
appCacheNanny.update() | ||
@@ -29,2 +29,3 @@ // The appCache nanny tells you if there is a new update available | ||
// She tells you about all relevant applicationCache events | ||
appCacheNanny.on('update', handleUpdate) | ||
appCacheNanny.on('error', handleError) | ||
@@ -31,0 +32,0 @@ appCacheNanny.on('obsolete', handleObsolete) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2021651
26604
171