datalist-polyfill.js
function(event) {
		var datalistSelect = event.target,
			datalist = datalistSelect.parentNode,
			input = dcmnt.querySelector('input[list="' + datalist.id + '"]');

		// Check for whether the events target was a select or whether the input doesn't exist
		if (datalistSelect.tagName.toLowerCase() !== 'select' || input === null) {
			return;
		}

		// Determine a relevant key - either printable characters (that would have a length of 1) or controlling like Backspace
		if (event.key && (event.key === 'Backspace' || event.key.length === 1)) {
			input.focus();

			if (event.key === 'Backspace') {
				input.value = input.value.substr(0, input.value.length - 1);

				// Dispatch the input event on the related input[list]
				dispatchInputEvent(input);
			} else {
				input.value += event.key;
			}

			prepOptions(datalist, input);
		}
	}
function(event) {
		var datalistSelect = event.target,
			datalist = datalistSelect.parentNode,
			input = dcmnt.querySelector('input[list="' + datalist.id + '"]');

		// Check for whether the events target was a select or whether the input doesn't exist
		if (datalistSelect.tagName.toLowerCase() !== 'select' || input === null) {
			return;
		}

		// Determine a relevant key - either printable characters (that would have a length of 1) or controlling like Backspace
		if (event.key && (event.key === 'Backspace' || event.key.length === 1)) {
			input.focus();

			if (event.key === 'Backspace') {
				input.value = input.value.substr(0, input.value.length - 1);

				// Dispatch the input event on the related input[list]
				dispatchInputEvent(input);
			} else {
				input.value += event.key;
			}

			prepOptions(datalist, input);
		}
	}
function ( event ) { var datalistSelect = event . target , datalist = datalistSelect . parentNode , input = dcmnt . querySelector ( 'input[list="' + datalist . id + '"]' ) ; // Check for whether the events target was a select or whether the input doesn't exist if ( datalistSelect . tagName . toLowerCase ( ) !== 'select' || input === null ) { return ; } // Determine a relevant key - either printable characters (that would have a length of 1) or controlling like Backspace if ( event . key && ( event . key === 'Backspace' || event . key . length === 1 ) ) { input . focus ( ) ; if ( event . key === 'Backspace' ) { input . value = input . value . substr ( 0 , input . value . length - 1 ) ; // Dispatch the input event on the related input[list] dispatchInputEvent ( input ) ; } else { input . value += event . key ; } prepOptions ( datalist , input ) ; } }
Functions regarding changes to the datalist polyfilling created selects keypress
Functions regarding changes to the datalist polyfilling created selects keypress