function addEventListenerWrapper(type, listener) {
		// Simulate a 'down arrow' keypress on hitting 'return' when no pac suggestion is selected,
		// and then trigger the original listener.
		if (type === 'keydown') {
			const origListener = listener;
			// eslint-disable-next-line no-param-reassign -- Is old style this should be analyzed
			listener = (event) => {
				const suggestionSelected = document
					? document.getElementsByClassName('pac-item-selected').length > 0
					: null;
				if (event.which === 13 && !suggestionSelected) {
					const simulatedEvent = document.createEvent('Event');
					simulatedEvent.keyCode = 40;
					simulatedEvent.which = 40;
					origListener.apply(input, [simulatedEvent]);
				}
				origListener.apply(input, [event]);
			};
		}
		_addEventListener.apply(input, [type, listener]);
	}
Add event listener wrapper that will replace to default addEventListener or attachEvent function

@param  {string} type the event type
@param  {Function} listener function should be executed when the event is fired
@returns {void}