Polyfill for implementing HTML5 datalist in unsupported browsers, using a select input as fallback. The polyfill is written in pure JavaScript (no Modernizr or jQuery needed).
Note: it currently submits the associated form when the select changes.
You can disable this behavior by setting data-select-submit="true"
on
the input.
To configure an empty value for the select, set data-select-placeholder
on
the input.
Install with component(1):
$ component install federicobond/small-datalist-polyfill
Applies the polyfill. Set the force
parameter to true
to apply it even on
supported browsers (useful for testing).
Configure the selector engine that the polyfill should use.
Defaults to document.querySelectorAll
.
var smallDatalistPolyfill = require("small-datalist-polyfill");
smallDatalistPolyfill.setSelectorEngine(qwery);
smallDatalistPolyfill.enable();
UNLICENSE