src/Binding.js
function (listenerId, f) {
    var samePathListeners = findSamePathListeners(this, listenerId);
    if (samePathListeners) {
      var descriptor = samePathListeners[listenerId];
      descriptor.disabled = true;
      Util.afterComplete(f, function () { descriptor.disabled = false; });
    } else {
      f();
    }
    return this;
  }
function (listenerId, f) {
    var samePathListeners = findSamePathListeners(this, listenerId);
    if (samePathListeners) {
      var descriptor = samePathListeners[listenerId];
      descriptor.disabled = true;
      Util.afterComplete(f, function () { descriptor.disabled = false; });
    } else {
      f();
    }
    return this;
  }
function ( listenerId , f ) { var samePathListeners = findSamePathListeners ( this , listenerId ) ; if ( samePathListeners ) { var descriptor = samePathListeners [ listenerId ] ; descriptor . disabled = true ; Util . afterComplete ( f , function ( ) { descriptor . disabled = false ; } ) ; } else { f ( ) ; } return this ; }
Execute function with listener temporarily disabled. Correctly handles functions returning promises.
@param {String} listenerId listener id
@param {Function} f function to execute
@return {Binding} this binding
Execute function with listener temporarily disabled . Correctly handles functions returning promises .