blaze.js
function () {
      var eventDict = element.$blaze_events;
      if (! eventDict)
        return;
      // newHandlerRecs has only one item unless you specify multiple
      // event types.  If this code is slow, it's because we have to
      // iterate over handlerList here.  Clearing a whole handlerList
      // via stop() methods is O(N^2) in the number of handlers on
      // an element.
      for (var i = 0; i < newHandlerRecs.length; i++) {
        var handlerToRemove = newHandlerRecs[i];
        var info = eventDict[handlerToRemove.type];
        if (! info)
          continue;
        var handlerList = info.handlers;
        for (var j = handlerList.length - 1; j >= 0; j--) {
          if (handlerList[j] === handlerToRemove) {
            handlerToRemove.unbind();
            handlerList.splice(j, 1); // remove handlerList[j]
          }
        }
      }
      newHandlerRecs.length = 0;
    }
function () {
      var eventDict = element.$blaze_events;
      if (! eventDict)
        return;
      // newHandlerRecs has only one item unless you specify multiple
      // event types.  If this code is slow, it's because we have to
      // iterate over handlerList here.  Clearing a whole handlerList
      // via stop() methods is O(N^2) in the number of handlers on
      // an element.
      for (var i = 0; i < newHandlerRecs.length; i++) {
        var handlerToRemove = newHandlerRecs[i];
        var info = eventDict[handlerToRemove.type];
        if (! info)
          continue;
        var handlerList = info.handlers;
        for (var j = handlerList.length - 1; j >= 0; j--) {
          if (handlerList[j] === handlerToRemove) {
            handlerToRemove.unbind();
            handlerList.splice(j, 1); // remove handlerList[j]
          }
        }
      }
      newHandlerRecs.length = 0;
    }
function ( ) { var eventDict = element . $blaze_events ; if ( ! eventDict ) return ; // newHandlerRecs has only one item unless you specify multiple // event types.  If this code is slow, it's because we have to // iterate over handlerList here.  Clearing a whole handlerList // via stop() methods is O(N^2) in the number of handlers on // an element. for ( var i = 0 ; i < newHandlerRecs . length ; i ++ ) { var handlerToRemove = newHandlerRecs [ i ] ; var info = eventDict [ handlerToRemove . type ] ; if ( ! info ) continue ; var handlerList = info . handlers ; for ( var j = handlerList . length - 1 ; j >= 0 ; j -- ) { if ( handlerList [ j ] === handlerToRemove ) { handlerToRemove . unbind ( ) ; handlerList . splice ( j , 1 ) ; // remove handlerList[j] } } } newHandlerRecs . length = 0 ; }
closes over just `element` and `newHandlerRecs`
closes over just element and newHandlerRecs