code: function () {
              if (this.mask) {
  
                  // Shrink mask first, so it doesn't affect the document size.
                  var mask = this.mask,
                      viewWidth = Dom.getViewportWidth(),
                      viewHeight = Dom.getViewportHeight();
  
                  if (mask.offsetHeight > viewHeight) {
                      mask.style.height = viewHeight + "px";
                  }
  
                  if (mask.offsetWidth > viewWidth) {
                      mask.style.width = viewWidth + "px";
                  }
  
                  // Then size it to the document
                  mask.style.height = Dom.getDocumentHeight() + "px";
                  mask.style.width = Dom.getDocumentWidth() + "px";
              }
          }
docs: Sets the size of the modality mask to cover the entire scrollable
  area of the document
  @method sizeMask