function overlayManagerUnregister(name) {
    return new Promise(function (resolve) {
      if (!this.overlays[name]) {
        throw new Error('The overlay does not exist.');
      } else if (this.active === name) {
        throw new Error('The overlay cannot be removed while it is active.');
      }
      delete this.overlays[name];

      resolve();
    }.bind(this));
  }
/**
   * @param {string} name The name of the overlay that is unregistered.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    unregistered.
   */
@param {string} name The name of the overlay that is unregistered.
@returns {Promise} A promise that is resolved when the overlay has been
unregistered.
@param { string } name The name of the overlay that is unregistered . @returns { Promise } A promise that is resolved when the overlay has been unregistered .
function overlayManagerUnregister(name) {
    return new Promise(function (resolve) {
      if (!this.overlays[name]) {
        throw new Error('The overlay does not exist.');
      } else if (this.active === name) {
        throw new Error('The overlay cannot be removed while it is active.');
      }
      delete this.overlays[name];
      resolve();
    }.bind(this));
  }
function overlayManagerUnregister ( name ) { return new Promise ( function ( resolve ) { if ( ! this . overlays [ name ] ) { throw new Error ( 'The overlay does not exist.' ) ; } else if ( this . active === name ) { throw new Error ( 'The overlay cannot be removed while it is active.' ) ; } delete this . overlays [ name ] ; resolve ( ) ; } . bind ( this ) ) ; }
@param {string} name The name of the overlay that is unregistered.
@param { string } name The name of the overlay that is unregistered .