The demo shows Service Workers as dependency injectors. Depending on your selection, a production or testing Service Worker will control this page and will serve proper versions of the scripts needed to run the interaction section below.

Select an environment:

Switch to production (dialogs will appear using the browser UI)
Switch to testing (dialogs will leave a trace in the console log)

What is cool about this demo is that you can see different content for the same resources if you explore the source files (Chrome only, Nightly fails to load the resource because it actually does not exists) with the developer tools.

Interaction