-
Notifications
You must be signed in to change notification settings - Fork 0
/
consuming.html
38 lines (36 loc) · 1.47 KB
/
consuming.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript Promises and Async Programming</title>
<meta name="author" content="Nate Taylor"></meta>
<link rel="stylesheet" href="./src/tachyons.min.css"></link>
<link rel="stylesheet" href="./src/site.css"></link>
<script src="./src/axios.min.js"></script>
</head>
<body>
<h1 class="green ml4">Consuming Promises</h1>
<a class="green ml4 pb4" href="./home">Back to home</a>
<div class="waiting hidden ml4 pa4">
<h2>Waiting...</h2>
</div>
<div class="flex w-50 pa4">
<button class="bg-green mr2" onclick="get()">Success GET</button>
<button class="bg-green mr2" onclick="getCatch()">Failed GET</button>
<button class="bg-green mr2" onclick="chain()">Promise Chain</button>
<button class="bg-green mr2" onclick="chainCatch()">Chain Catch</button>
<button class="bg-green mr2" onclick="final()">Final Update</button>
</div>
<div class="results w-50 ml4 mt4 pa4">
<h1>Results</h1>
</div>
<script type="module">
import { get, getCatch, chain, chainCatch, final } from "./src/consuming.mjs";
window.get = get;
window.getCatch = getCatch;
window.chain = chain;
window.chainCatch = chainCatch;
window.final = final;
</script>
</body>
</html>