code: function (type, args, obj) {
              var val = args[0];
  
              if (val) {
                  if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
                      this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
                  }
                  if (! Config.alreadySubscribed(this.beforeShowEvent, this._primeXYFromDOM)) {
                      this.beforeShowEvent.subscribe(this._primeXYFromDOM);
                  }
              } else {
                  this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);
                  this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
              }
          }
docs: The default event handler fired when the "constraintoviewport"
  property is changed.
  @method configConstrainToViewport
  @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.