You can add the option { once: true } to an event listener to automatically remove it when has been invoked posted on 24.07.2020