File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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/combobox-nav@1.0.2/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 >
You can’t perform that action at this time.
0 commit comments