Skip to content

Commit dd2631b

Browse files
committed
chore: add SW example
1 parent 04c3ce9 commit dd2631b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/example-sw.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>SW test</title>
5+
<script src="https://unpkg.com/pokeapi-js-wrapper@1.2.0-beta.0/dist/index.js"></script>
6+
</head>
7+
8+
<body>
9+
<script>
10+
const P = new Pokedex.Pokedex({ cacheImages: true });
11+
</script>
12+
<div id="app">
13+
<img
14+
src="https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/dream-world/25.svg"
15+
alt="Pikachu"
16+
/>
17+
</div>
18+
<div>
19+
The above image is served (once cached) by the local pokeapi-js-wrapper-sw.js. Check it out in the Developer Console (F12) by looking and the Network Panel and also at the Application Panel.
20+
</div>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)