generated from HugoDF/node-mit-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml-esc.html
More file actions
25 lines (24 loc) · 650 Bytes
/
html-esc.html
File metadata and controls
25 lines (24 loc) · 650 Bytes
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
<!doctype html>
<html>
<head>
<title>`html-esc` Examples</title>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
</head>
<body>
<h1>`html-esc` examples</h1>
<my-component></my-component>
<script type="importmap">
{
"imports": {
"html-esc": "https://esm.sh/html-esc",
"#html-esc": "./html-esc.js"
}
}
</script>
<script type="module">
import { html } from "html-esc";
const message = "<strong>strong but will get escaped</strong>";
document.body.innerHTML = html`<div>I'm ${message}</div>`;
</script>
</body>
</html>