-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-harness.html
69 lines (65 loc) · 2.57 KB
/
test-harness.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Test Harness!</title>
<script type="module">
import fetchInject from '../fetch-inject.min.js';
const pageReady = new Promise((resolve, reject) => {
document.onreadystatechange = () => {
document.readyState === 'complete' && resolve(document);
};
});
fetchInject(
[
'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js',
'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'
],
fetchInject(
['https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js'],
fetchInject(['https://code.jquery.com/jquery-3.2.1.slim.min.js'], pageReady)
)
).then(() => (document.body.style.visibility = 'visible'));
</script>
</head>
<body style="visibility: hidden">
<div class="alert alert-primary" role="alert">This is a primary alert—check it out!</div>
<div class="alert alert-secondary" role="alert">This is a secondary alert—check it out!</div>
<div class="alert alert-success" role="alert">This is a success alert—check it out!</div>
<div class="alert alert-danger" role="alert">This is a danger alert—check it out!</div>
<div class="alert alert-warning" role="alert">This is a warning alert—check it out!</div>
<div class="alert alert-info" role="alert">This is a info alert—check it out!</div>
<div class="alert alert-light" role="alert">This is a light alert—check it out!</div>
<div class="alert alert-dark" role="alert">This is a dark alert—check it out!</div>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Launch demo modal
</button>
<!-- Modal -->
<div
class="modal fade"
id="exampleModal"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">...</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</body>
</html>