code: function(inEvent) {
        // This is used to prevent multiple dispatch of events from
        // platform events. This can happen when two elements in different scopes
        // are set up to create pointer events, which is relevant to Shadow DOM.
  
        var type = inEvent.type;
  
        // only generate the list of desired events on "down"
        if (type === 'touchstart' || type === 'mousedown' || type === 'pointerdown' || type === 'MSPointerDown') {
          if (!inEvent._handledByPG) {
            currentGestures = {};
          }
  
          // in IOS mode, there is only a listener on the document, so this is not re-entrant
          if (this.IS_IOS) {
            var ev = inEvent;
            if (type === 'touchstart') {
              var ct = inEvent.changedTouches[0];
              // set up a fake event to give to the path builder
              ev = {target: inEvent.target, clientX: ct.clientX, clientY: ct.clientY, path: inEvent.path};
            }
            // use event path if available, otherwise build a path from target finding
            var nodes = inEvent.path || scope.targetFinding.path(ev);
            for (var i = 0, n; i < nodes.length; i++) {
              n = nodes[i];
              this.addGestureDependency(n, currentGestures);
            }
          } else {
            this.addGestureDependency(inEvent.currentTarget, currentGestures);
          }
        }
  
        if (inEvent._handledByPG) {
          return;
        }
        var fn = this.eventMap && this.eventMap[type];
        if (fn) {
          fn(inEvent);
        }
        inEvent._handledByPG = true;
      }
docs: LISTENER LOGIC