addListenerUntilResultInvoked = (target, type, listener) => {
    target.addEventListener(type, listener);
    return () => target.removeEventListener(type, listener);
}
@param {!EventTarget} target
@param {!string} type
@param {!EventListener|!Function} listener
@returns {!function() : void}