MCPcopy Create free account
hub / github.com/ampproject/amphtml / onTouchStart_

Method onTouchStart_

src/pull-to-refresh.js:68–80  ·  view source on GitHub ↗

* @param {!Event} event * @private

(event)

Source from the content-addressed store, hash-verified

66 * @private
67 */
68 onTouchStart_(event) {
69 // P2R won't trigger when document is scrolled. Also can ignore when we are
70 // already tracking this touch and for non-single-touch events.
71 if (
72 this.tracking_ ||
73 !(event.touches && event.touches.length == 1) ||
74 this.viewport_.getScrollTop() > 0
75 ) {
76 return;
77 }
78
79 this.startTracking_(event.touches[0].clientY);
80 }
81
82 /**
83 * @param {number} startPos

Callers

nothing calls this directly

Calls 2

startTracking_Method · 0.95
getScrollTopMethod · 0.45

Tested by

no test coverage detected