async function eventAsAsyncFunction(object, eventname) {
  const resolver = new Resolver();
  object[eventname] = e => {
    object[eventname] = null;
    resolver.resolve(e);
  }
  return resolver.promise;
}
/**
 * Makes the next |object[eventname]| event resolve the returned promise with
 * the event argument and resets the event handler to null.
 * @private
 */
Makes the next |object[eventname]| event resolve the returned promise with
the event argument and resets the event handler to null.
@private
Makes the next |object [ eventname ] | event resolve the returned promise with the event argument and resets the event handler to null . @private
async function eventAsAsyncFunction(object, eventname) {
  const resolver = new Resolver();
  object[eventname] = e => {
    object[eventname] = null;
    resolver.resolve(e);
  }
  return resolver.promise;
}
async function eventAsAsyncFunction ( object , eventname ) { const resolver = new Resolver ( ) ; object [ eventname ] = e => { object [ eventname ] = null ; resolver . resolve ( e ) ; } return resolver . promise ; }
Makes the next |object[eventname]| event resolve the returned promise with
 the event argument and resets the event handler to null.
Makes the next |object [ eventname ] | event resolve the returned promise with the event argument and resets the event handler to null .