autocomplete-element
Wire up autocomplete for an <input type="text">
element.
example
Auto-complete the months.
var auto = ;var input = document;var months ="January" "February" "March" "April" "May" "June" "July""August" "September" "October" "November" "December";;{ return x }
methods
var c =
Create a new autocomplete instance c
that wraps an input
element and
optionally sets up a keydown listener fn
.
fn(c, ev)
fires when there is new text input to deal with.
c.suggest(suggestions)
Auto-complete an array of suggestions
. The first suggestion in the array is
shadowed under the active text.
c.set(value)
Set the value for the input text and the shadow text.
install
With npm do:
npm install autocomplete-element
license
MIT