code: function until(emitter, eventName, handler, context) {
    handler = context ? handler.bind(context) : handler;
    let wrapper = function untilHandler(event) {
      if (handler(event))
        emitter.removeEventListener(eventName, untilHandler);
    };
    emitter.addEventListener(eventName, wrapper);
    return wrapper;
  }
docs: Register to receive events until the handler function returns true.