-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspa-js.html
25 lines (22 loc) · 900 Bytes
/
spa-js.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SPA JS</title>
</head>
<body>
<p>👉 Please open with an HTTP server at the project root folder</p>
<a href="/foo" prevent
data-href="/examples/partials/foo.html"
send-prop="data-href" send-on="click" send-to="main" send-as="text"
>Foo</a>
<a href="/bar" prevent data-href="/examples/partials/bar.html" send="data-href|click|main|text" >Bar</a>
<a href="/zoo" prevent data-href="/examples/partials/zoo.html" send="data-href|click|main|text" >Zoo</a>
<main receive-as="fetch-html-js" on-receive-error="({message},target) => console.log(message)" ></main>
<script type="module" >
import { register } from '../dist/index.esm.js';
register( document.body );
</script>
</body>
</html>