Implement 'once' event listener option
The DOM Standard defines a 'once' option for addEventListener() which causes the callback to only be called once, upon the next occurrence of the given event type, after which the listener gets automatically removed:
The effect is similar to jQuery's popular $.one() method.
‘once’ is now in development in Edge. You can follow progress at https://developer.microsoft.com/en-us/microsoft-edge/platform/status/eventlisteneronceoption