Files
workbox/demos/functions/views/demo/workbox-routing.hbs
T
Jeffrey PosnickandGitHub 9d88f2abae The contents of v3, reconciled with master (#1357)
* The contents of v3, reconciled with master.

* Remove a few stray files.

* Another extra file.

* Two more deletions.

* Setting up for stable release

* v3.0.0

* Updating CDN and versions

* Doc repair for wf (#1358)

* Changing doc structure to work with WF

* Changing doc structure to work with WF
2018-03-13 15:20:33 -04:00

26 lines
823 B
Handlebars

<section>
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<ol>
<li>Open DevTools</li>
<li>Go to the Console</li>
<li>Click this button:<br /><button class="install-sw btn btn-outline-primary">Install Service Worker</button></li>
<li><strong>Refresh the page</strong></li>
<li>Notice that the image '/demo/workbox-routing/demo-img.png' was routed and is now a party popper</li>
</ol>
<img src="/demo/workbox-routing/demo-img.png" style="width: 300px; height: 300px;"/>
</div>
</div>
</div>
</section>
<script>
const firstBtn = document.querySelector('.install-sw');
firstBtn.addEventListener('click', () => {
navigator.serviceWorker.register('/demo/workbox-routing/sw.js');
});
</script>