-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreating.html
39 lines (37 loc) · 1.66 KB
/
creating.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
39
<!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="blue ml4">Creating Promises</h1>
<a class="blue ml4 pb4" href="./home">Back to home</a>
<div class="flex w-50 pa4">
<button class="bg-blue mr2" onclick="timeout()">Timeout</button>
<button class="bg-blue mr2" onclick="interval()">Interval</button>
<button class="bg-blue mr2" onclick="clearIntervalChain()">Clear Interval</button>
<button class="bg-blue mr2" onclick="xhr()">XHR</button>
<button class="bg-blue mr2" onclick="allPromises()">All</button>
<button class="bg-blue mr2" onclick="allSettled()">All Settled</button>
<button class="bg-blue mr2" onclick="race()">Race</button>
</div>
<div class="results w-50 ml4 mt4 pa4">
<h1>Results</h1>
</div>
<script type="module">
import { timeout, interval, clearIntervalChain, xhr, allPromises, allSettled, race } from "./src/creating.mjs";
window.timeout = timeout;
window.interval = interval;
window.clearIntervalChain = clearIntervalChain;
window.xhr = xhr;
window.allPromises = allPromises;
window.allSettled = allSettled;
window.race = race;
</script>
</body>
</html>