Note: On macOS, you can only register protocols that have been added to your app's info.
Each time a page within your scope is loaded, the service worker is installed against that page and operates on it. Somewhere in the function, we need to define what happens for the promise to resolve successfully or be rejected — in this case return a OK status or not — and then call resolve on success, or reject on failure.
The new version is installing in the background.
Those features are not used here so that you can focus on understanding Promises. Otherwise, it will return false. The Service worker will now control pages, but only those opened after the register is successful.
To restart the daemon, either stop the inetd process and restart it, or enter a fastboot command on the SunOS 4.