Re: [w3c/webcomponents] Make JavaScript Files a Valid Entry Point to a Web Page (#807)

@Lonniebiz [this "site"](https://webreflection.github.io/test/site-js/) is 100% driven by Service Worker.

The index is basically this:
```html
<script>navigator.serviceWorker.register('sw.js').then(()=>{location.href="$/index.js"})</script>
```

Everything else is served via JS. As you know already, GitHub is also for static pages only, so you could do pretty much anything you want.

I haven't bothered using a cache to store pages, and I'm using unpkg service out of the box, so there's room for optimizations but the thing works already.

[All used files are here](https://github.com/WebReflection/test/tree/master/site-js), I hope this helps showing off ServiceWorkers can already be used to generate sites directly via JS only.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/807#issuecomment-486336245

Received on Wednesday, 24 April 2019 17:08:47 UTC