diff --git a/lib/intermediate-representation-dir/production-app.js b/lib/intermediate-representation-dir/production-app.js index 664c295e22c1a..c650556e28af6 100644 --- a/lib/intermediate-representation-dir/production-app.js +++ b/lib/intermediate-representation-dir/production-app.js @@ -28,8 +28,22 @@ try { // Install service worker. runtime.install({ - onInstalled () { - console.log(`App is ready for offline usage`) + onInstalled: () => { + console.log("SW Event:", "onInstalled") + }, + onUpdating: () => { + console.log("SW Event:", "onUpdating") + }, + onUpdateReady: () => { + console.log("SW Event:", "onUpdateReady") + runtime.applyUpdate() + }, + onUpdated: () => { + console.log("SW Event:", "onUpdated") + apiRunner('swOnUpdated') + }, + onUninstalled: () => { + console.log("SW Event:", "onUninstalled") }, })