-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodules.html
executable file
·72 lines (64 loc) · 1.65 KB
/
modules.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
70
71
72
<!DOCTYPE html>
<html checkerboard>
<head>
<title>SMotaal's Modules Experiment</title>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover" />
<link rel="stylesheet" href="/fonts/iosevka.css" />
<link rel="stylesheet" href="/pholio/styles/styles.css" />
<style>
html {
--shade: #eeee;
}
body>main {
display: grid;
padding: 0;
margin: 0;
min-width: calc(100vw - 2rem);
min-height: inherit;
grid-auto-rows: max-content;
}
body>main>* {
opacity: 1;
background-color: var(--dom-console-background--, #fff);
padding: 1rem;
/* min-width: 45em; */
overflow-x: scroll;
}
body>main>pre.preview:first-child {
height: 45vh;
overflow: scroll;
/* overscroll-behavior: contain; */
}
body>main>output.console:empty::before {
color: #999;
text-align: center;
content: 'No console output to show yet!';
display: grid;
}
body>main>script,
body>main>style {
display: none;
}
</style>
</head>
<body>
<main>
<output class="console"></output>
</main>
<script type="module" src="/console/experiments/dom-console/dom-console.mjs"></script>
<script type="module">
(async () => {
const source = await (await fetch('./modules.spec.js')).text();
const preview = document.createElement('pre');
preview.textContent = source.replace(/\t/g, ' ');
preview.className = 'preview';
document.querySelector('main').prepend(preview);
await new Promise(requestAnimationFrame);
// (1, eval)(source);
})();
</script>
<script type="module" src="./esm.mjs"></script>
</body>
</html>