) => {
                        if (serviceWorker.state == "activated") {
                            console.log("Installed new service worker.");
                            loadMainDartJs();
                        }
                    });
                }

                if (!reg.active && (reg.installing || reg.waiting)) {
                    // No active web worker and we have installed or are installing
                    // one for the first time. Simply wait for it to activate.
                 