Skip to content

Commit 24bf194

Browse files
authored
Add a temprary demo page for v1.0.2
1 parent 700b300 commit 24bf194

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

examples/index-v1.0.2.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>combobox-nav demo</title>
6+
<!-- <script type="text/javascript" src="../dist/combobox-nav.umd.js"></script> -->
7+
<script type="text/javascript" src="https://unpkg.com/@github/[email protected]/dist/combobox-nav.umd.js"></script>
8+
<style>[aria-selected="true"] { font-weight: bold; }</style>
9+
</head>
10+
<body>
11+
<form>
12+
<label>
13+
Least favorite robot
14+
<input aria-owns="list-id" role="combobox" type="text">
15+
</label>
16+
<ul role="listbox" id="list-id">
17+
<li id="baymax" role="option">Baymax</li>
18+
<li id="bb-8" role="option" aria-disabled="true"><del>BB-8</del></li>
19+
<li id="hubot" role="option">Hubot</li>
20+
<li id="r2-d2" role="option">R2-D2</li>
21+
<li><a id="wall-e" href="#wall-e" role="option">Wall-E</a></li>
22+
</ul>
23+
</form>
24+
<pre class="events"></pre>
25+
<script type="text/javascript">
26+
comboboxNav.install(document.querySelector('input'), document.querySelector('ul'))
27+
28+
const events = document.querySelector('.events')
29+
document.addEventListener('combobox-commit', function(event) {
30+
events.append(`combobox-commit event on ${event.target.textContent}\n`)
31+
})
32+
</script>
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)