Skip to content

Commit cd4eb64

Browse files
committed
docs: add cdn example
1 parent 65483d8 commit cd4eb64

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/cdn.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<html>
2+
<body>
3+
<div>The first released Pokemon version name is: </div><div id="version"></div>
4+
</body>
5+
<script type="module">
6+
import {Pokedex} from "https://cdn.jsdelivr.net/gh/pokeapi/pokeapi-js-wrapper@beta/src/index.js"
7+
const P = new Pokedex();
8+
const version = await P.getVersionByName(1)
9+
document.getElementById("version").textContent = version.name;
10+
</script>
11+
</html>

0 commit comments

Comments
 (0)