function overlayManagerRegister(name,
                                            callerCloseMethod, canForceClose) {
    return new Promise(function (resolve) {
      var element, container;
      if (!name || !(element = document.getElementById(name)) ||
          !(container = element.parentNode)) {
        throw new Error('Not enough parameters.');
      } else if (this.overlays[name]) {
        throw new Error('The overlay is already registered.');
      }
      this.overlays[name] = { element: element,
                              container: container,
                              callerCloseMethod: (callerCloseMethod || null),
                              canForceClose: (canForceClose || false) };
      resolve();
    }.bind(this));
  }
/**
   * @param {string} name The name of the overlay that is registered. This must
   *                 be equal to the ID of the overlay's DOM element.
   * @param {function} callerCloseMethod (optional) The method that, if present,
   *                   will call OverlayManager.close from the Object
   *                   registering the overlay. Access to this method is
   *                   necessary in order to run cleanup code when e.g.
   *                   the overlay is force closed. The default is null.
   * @param {boolean} canForceClose (optional) Indicates if opening the overlay
   *                  will close an active overlay. The default is false.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    registered.
   */
@param {string} name The name of the overlay that is registered. This must
be equal to the ID of the overlay's DOM element.
@param {function} callerCloseMethod (optional) The method that, if present,
will call OverlayManager.close from the Object
registering the overlay. Access to this method is
necessary in order to run cleanup code when e.g.
the overlay is force closed. The default is null.
@param {boolean} canForceClose (optional) Indicates if opening the overlay
will close an active overlay. The default is false.
@returns {Promise} A promise that is resolved when the overlay has been
registered.
@param { string } name The name of the overlay that is registered . This must be equal to the ID of the overlay ' s DOM element . @param { function } callerCloseMethod ( optional ) The method that if present will call OverlayManager . close from the Object registering the overlay . Access to this method is necessary in order to run cleanup code when e . g . the overlay is force closed . The default is null . @param { boolean } canForceClose ( optional ) Indicates if opening the overlay will close an active overlay . The default is false . @returns { Promise } A promise that is resolved when the overlay has been registered .
function overlayManagerRegister(name,
                                            callerCloseMethod, canForceClose) {
    return new Promise(function (resolve) {
      var element, container;
      if (!name || !(element = document.getElementById(name)) ||
          !(container = element.parentNode)) {
        throw new Error('Not enough parameters.');
      } else if (this.overlays[name]) {
        throw new Error('The overlay is already registered.');
      }
      this.overlays[name] = { element: element,
                              container: container,
                              callerCloseMethod: (callerCloseMethod || null),
                              canForceClose: (canForceClose || false) };
      resolve();
    }.bind(this));
  }
function overlayManagerRegister ( name , callerCloseMethod , canForceClose ) { return new Promise ( function ( resolve ) { var element , container ; if ( ! name || ! ( element = document . getElementById ( name ) ) || ! ( container = element . parentNode ) ) { throw new Error ( 'Not enough parameters.' ) ; } else if ( this . overlays [ name ] ) { throw new Error ( 'The overlay is already registered.' ) ; } this . overlays [ name ] = { element : element , container : container , callerCloseMethod : ( callerCloseMethod || null ) , canForceClose : ( canForceClose || false ) } ; resolve ( ) ; } . bind ( this ) ) ; }
@param {string} name The name of the overlay that is registered.
@param { string } name The name of the overlay that is registered .