const wasTouched = () => {
myFrameworkOfChoice.dispatchEvent('USER_HAS_TOUCHED', true);
window.removeEventListener('touchstart', wasTouched, false);
window.addEventListener('mousedown', wasClicked, false);
};
const wasClicked = () => {
myFrameworkOfChoice.dispatchEvent('USER_HAS_TOUCHED', false);
window.removeEventListener('mousedown', wasClicked, false);
window.addEventListener('touchstart', wasTouched, false);
};
window.addEventListener('touchstart', wasTouched, false);