src/mousetracker.js
function capturePointer( tracker, pointerType, pointerCount ) {
        var pointsList = tracker.getActivePointersListByType( pointerType ),
            eventParams;

        pointsList.captureCount += (pointerCount || 1);

        if ( pointsList.captureCount === 1 ) {
            if ( $.Browser.vendor === $.BROWSERS.IE && $.Browser.version < 9 ) {
                tracker.element.setCapture( true );
            } else {
                eventParams = getCaptureEventParams( tracker, $.MouseTracker.havePointerEvents ? 'pointerevent' : pointerType );
                // We emulate mouse capture by hanging listeners on the document object.
                //    (Note we listen on the capture phase so the captured handlers will get called first)
                // eslint-disable-next-line no-use-before-define
                if (isInIframe && canAccessEvents(window.top)) {
                    $.addEvent(
                        window.top,
                        eventParams.upName,
                        eventParams.upHandler,
                        true
                    );
                }
                $.addEvent(
                    $.MouseTracker.captureElement,
                    eventParams.upName,
                    eventParams.upHandler,
                    true
                );
                $.addEvent(
                    $.MouseTracker.captureElement,
                    eventParams.moveName,
                    eventParams.moveHandler,
                    true
                );
            }
        }
    }
function capturePointer( tracker, pointerType, pointerCount ) {
        var pointsList = tracker.getActivePointersListByType( pointerType ),
            eventParams;

        pointsList.captureCount += (pointerCount || 1);

        if ( pointsList.captureCount === 1 ) {
            if ( $.Browser.vendor === $.BROWSERS.IE && $.Browser.version < 9 ) {
                tracker.element.setCapture( true );
            } else {
                eventParams = getCaptureEventParams( tracker, $.MouseTracker.havePointerEvents ? 'pointerevent' : pointerType );
                // We emulate mouse capture by hanging listeners on the document object.
                //    (Note we listen on the capture phase so the captured handlers will get called first)
                // eslint-disable-next-line no-use-before-define
                if (isInIframe && canAccessEvents(window.top)) {
                    $.addEvent(
                        window.top,
                        eventParams.upName,
                        eventParams.upHandler,
                        true
                    );
                }
                $.addEvent(
                    $.MouseTracker.captureElement,
                    eventParams.upName,
                    eventParams.upHandler,
                    true
                );
                $.addEvent(
                    $.MouseTracker.captureElement,
                    eventParams.moveName,
                    eventParams.moveHandler,
                    true
                );
            }
        }
    }
function capturePointer ( tracker , pointerType , pointerCount ) { var pointsList = tracker . getActivePointersListByType ( pointerType ) , eventParams ; pointsList . captureCount += ( pointerCount || 1 ) ; if ( pointsList . captureCount === 1 ) { if ( $ . Browser . vendor === $ . BROWSERS . IE && $ . Browser . version < 9 ) { tracker . element . setCapture ( true ) ; } else { eventParams = getCaptureEventParams ( tracker , $ . MouseTracker . havePointerEvents ? 'pointerevent' : pointerType ) ; // We emulate mouse capture by hanging listeners on the document object. //    (Note we listen on the capture phase so the captured handlers will get called first) // eslint-disable-next-line no-use-before-define if ( isInIframe && canAccessEvents ( window . top ) ) { $ . addEvent ( window . top , eventParams . upName , eventParams . upHandler , true ) ; } $ . addEvent ( $ . MouseTracker . captureElement , eventParams . upName , eventParams . upHandler , true ) ; $ . addEvent ( $ . MouseTracker . captureElement , eventParams . moveName , eventParams . moveHandler , true ) ; } } }
Begin capturing pointer events to the tracked element.
@private
@inner
Begin capturing pointer events to the tracked element .