src/amazon-autocomplete.js
function _getSuggestions(prefix) {
        let scriptContainer = document.getElementById('ac__script');
        let newScript = document.createElement('script');
        newScript.src = 'http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q='+prefix+'&callback=AmazonAutocomplete.AmazonJSONPCallbackHandler_'+this._id;
        scriptContainer.replaceChild(newScript, scriptContainer.firstChild);
    }
function _getSuggestions(prefix) {
        let scriptContainer = document.getElementById('ac__script');
        let newScript = document.createElement('script');
        newScript.src = 'http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q='+prefix+'&callback=AmazonAutocomplete.AmazonJSONPCallbackHandler_'+this._id;
        scriptContainer.replaceChild(newScript, scriptContainer.firstChild);
    }
function _getSuggestions ( prefix ) { let scriptContainer = document . getElementById ( 'ac__script' ) ; let newScript = document . createElement ( 'script' ) ; newScript . src = 'http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q=' + prefix + '&callback=AmazonAutocomplete.AmazonJSONPCallbackHandler_' + this . _id ; scriptContainer . replaceChild ( newScript , scriptContainer . firstChild ) ; }
Replace the fetching script tag with a new one to get the autocompletion suggestions
for the desired prefix

@param {string} prefix - The letters written by the user in the html search input
Replace the fetching script tag with a new one to get the autocompletion suggestions for the desired prefix