src/js/autocomplete.js
function (element, startPos, options) {
            this.startFrom = startPos;
            this.wrapper.remove();
            if (this.elementHint) {
                this.elementHint.remove();
                this.elementHint = null;
            }
            
            if (fontSize == '') {
                fontSize = window.getComputedStyle(element).getPropertyValue('font-size');
            }
            if (fontFamily == '') {
                fontFamily = window.getComputedStyle(element).getPropertyValue('font-family');
            }
            
            var w = element.getBoundingClientRect().right - element.getBoundingClientRect().left;
            dropDown.style.marginLeft = '0';
            dropDown.style.marginTop = element.getBoundingClientRect().height + 'px';
            this.options = options;

            if (this.element != element) {
                this.element = element;
                this.elementStyle = {
                    zIndex: this.element.style.zIndex,
                    position: this.element.style.position,
                    backgroundColor: this.element.style.backgroundColor,
                    borderColor: this.element.style.borderColor
                }
            }

            this.element.style.zIndex = 3;
            this.element.style.position = 'relative';
            this.element.style.backgroundColor = 'transparent';
            this.element.style.borderColor = 'transparent';

            this.elementHint = element.cloneNode();
            this.elementHint.className = 'autocomplete hint';
            this.elementHint.style.zIndex = 2;
            this.elementHint.style.position = 'absolute';
            this.elementHint.onfocus = function () { this.element.focus(); }.bind(this);



            if (this.element.addEventListener) {
                this.element.removeEventListener("keydown", keyDownHandler);
                this.element.addEventListener("keydown", keyDownHandler, false);
                this.element.removeEventListener("blur", onBlurHandler);
                this.element.addEventListener("blur", onBlurHandler, false);                
            } 

            wrapper.appendChild(this.elementHint);
            wrapper.appendChild(dropDown);
            element.parentElement.appendChild(wrapper);


            this.repaint(element);
        }
function (element, startPos, options) {
            this.startFrom = startPos;
            this.wrapper.remove();
            if (this.elementHint) {
                this.elementHint.remove();
                this.elementHint = null;
            }
            
            if (fontSize == '') {
                fontSize = window.getComputedStyle(element).getPropertyValue('font-size');
            }
            if (fontFamily == '') {
                fontFamily = window.getComputedStyle(element).getPropertyValue('font-family');
            }
            
            var w = element.getBoundingClientRect().right - element.getBoundingClientRect().left;
            dropDown.style.marginLeft = '0';
            dropDown.style.marginTop = element.getBoundingClientRect().height + 'px';
            this.options = options;

            if (this.element != element) {
                this.element = element;
                this.elementStyle = {
                    zIndex: this.element.style.zIndex,
                    position: this.element.style.position,
                    backgroundColor: this.element.style.backgroundColor,
                    borderColor: this.element.style.borderColor
                }
            }

            this.element.style.zIndex = 3;
            this.element.style.position = 'relative';
            this.element.style.backgroundColor = 'transparent';
            this.element.style.borderColor = 'transparent';

            this.elementHint = element.cloneNode();
            this.elementHint.className = 'autocomplete hint';
            this.elementHint.style.zIndex = 2;
            this.elementHint.style.position = 'absolute';
            this.elementHint.onfocus = function () { this.element.focus(); }.bind(this);



            if (this.element.addEventListener) {
                this.element.removeEventListener("keydown", keyDownHandler);
                this.element.addEventListener("keydown", keyDownHandler, false);
                this.element.removeEventListener("blur", onBlurHandler);
                this.element.addEventListener("blur", onBlurHandler, false);                
            } 

            wrapper.appendChild(this.elementHint);
            wrapper.appendChild(dropDown);
            element.parentElement.appendChild(wrapper);


            this.repaint(element);
        }
Only to allow  easy access to the HTML elements to the final user (possibly for minor customizations)