code: function (type, args, obj) {
  
              var modal = args[0];
              if (modal) {
                  if (!this._hasModalityEventListeners) {
  
                      this.subscribe("beforeShow", this.buildMask);
                      this.subscribe("beforeShow", this.bringToTop);
                      this.subscribe("beforeShow", this.showMask);
                      this.subscribe("hide", this.hideMask);
  
                      Overlay.windowResizeEvent.subscribe(this.sizeMask, 
                          this, true);
  
                      this._hasModalityEventListeners = true;
                  }
              } else {
                  if (this._hasModalityEventListeners) {
  
                      if (this.cfg.getProperty("visible")) {
                          this.hideMask();
                          this.removeMask();
                      }
  
                      this.unsubscribe("beforeShow", this.buildMask);
                      this.unsubscribe("beforeShow", this.bringToTop);
                      this.unsubscribe("beforeShow", this.showMask);
                      this.unsubscribe("hide", this.hideMask);
  
                      Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
  
                      this._hasModalityEventListeners = false;
                  }
              }
          }
docs: The default event handler fired when the "modal" property is
  changed. This handler subscribes or unsubscribes to the show and hide
  events to handle the display or hide of the modality mask.
  @method configModal
  @param {String} type The CustomEvent type (usually the property name)
  @param {Object[]} args The CustomEvent arguments. For configuration
  handlers, args[0] will equal the newly applied value for the property.
  @param {Object} obj The scope object. For configuration handlers,
  this will usually equal the owner.