code: function preventGhostClick(x, y) {
      if (!touchCoordinates) {
        $rootElement[0].addEventListener('click', onClick, true);
        $rootElement[0].addEventListener('touchstart', onTouchStart, true);
        touchCoordinates = [];
      }
  
      lastPreventedTime = Date.now();
  
      checkAllowableRegions(touchCoordinates, x, y);
    }
docs: On the first call, attaches some event handlers. Then whenever it gets called, it creates a zone around the touchstart where clicks will get busted.