Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const clear = this._clearEl = document.createElement('button');
clear.classList.add('geocoder-icon', 'geocoder-icon-close');
clear.addEventListener('click', this._clear.bind(this));
const loading = this._loadingEl = document.createElement('span');
loading.classList.add('geocoder-icon', 'geocoder-icon-loading');
actions.appendChild(clear);
actions.appendChild(loading);
el.appendChild(icon);
el.appendChild(input);
el.appendChild(actions);
this.container.appendChild(el);
this.client = new MapboxClient(this.options.accessToken ?
this.options.accessToken :
mapboxgl.accessToken);
// Override the control being added to control containers
if (this.options.container) this.options.position = false;
this._typeahead = new Typeahead(input, []);
this._typeahead.getItemValue = function(item) { return item.place_name; };
return el;
}