function setupEventListeners(reference, options, state, updateBound) {
  // Resize event listener on window
  state.updateBound = updateBound;
  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });

  // Scroll event listener on scroll parents
  var scrollElement = getScrollParent(reference);
  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  state.scrollElement = scrollElement;
  state.eventsEnabled = true;

  return state;
}
function setupEventListeners(reference, options, state, updateBound) {
  // Resize event listener on window
  state.updateBound = updateBound;
  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });

  // Scroll event listener on scroll parents
  var scrollElement = getScrollParent(reference);
  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  state.scrollElement = scrollElement;
  state.eventsEnabled = true;

  return state;
}
function setupEventListeners ( reference , options , state , updateBound ) { // Resize event listener on window state . updateBound = updateBound ; getWindow ( reference ) . addEventListener ( 'resize' , state . updateBound , { passive : true } ) ; // Scroll event listener on scroll parents var scrollElement = getScrollParent ( reference ) ; attachToScrollParents ( scrollElement , 'scroll' , state . updateBound , state . scrollParents ) ; state . scrollElement = scrollElement ; state . eventsEnabled = true ; return state ; }
Setup needed event listeners used to update the popper position
@method
@memberof Popper.Utils
@private
Setup needed event listeners used to update the popper position
Setup event listeners on the window and scroll parents