packages/mip/src/util/dom/event.js
function listenOnce (element, eventType, listener, optEvtListenerOpts) {
  let unlisten = listen(element, eventType, event => {
    unlisten()
    listener(event)
  }, optEvtListenerOpts)
  return unlisten
}
function listenOnce (element, eventType, listener, optEvtListenerOpts) {
  let unlisten = listen(element, eventType, event => {
    unlisten()
    listener(event)
  }, optEvtListenerOpts)
  return unlisten
}
function listenOnce ( element , eventType , listener , optEvtListenerOpts ) { let unlisten = listen ( element , eventType , event => { unlisten ( ) listener ( event ) } , optEvtListenerOpts ) return unlisten }
Listens for the specified event on the element and removes the listener
as soon as event has been received.
@param {!EventTarget} element
@param {string} eventType
@param {function(!Event)} listener
@param {Object=} optEvtListenerOpts
@return {!UnlistenDef}
Listens for the specified event on the element and removes the listener as soon as event has been received .