"Uncaught (in promise) DOMException: Public-key credentials are only available to HTTPS origin or HTTP origins that fall under 'localhost'. See https://crbug.com/824383"
Unfortunate :/
This is of course not very user friendly, but might have some use, if you can't or don't want to have running server 24/7 at your home or secure location.
But I don't know, if any browser will let offline apps live for indefinite time.
I was even playing with code signing web apps with help of service workers, which was not bullet proof, but better than nothing. Ultimately it failed on the fact, that you could not prevent/cache/block update of actual service worker file.
Another dirty workaround could be using dynamic one time address for serving service worker only on first attempt and then browser would get 404 on attempts to update service worker. Again, not very useful as you are at mercy that browser won't just purge such "broken" worker.
You would need to run a local webserver and access it over `localhost`.