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

Function createPointerEvent

testing/helpers/service.js:351–366  ·  view source on GitHub ↗
(type, x, y)

Source from the content-addressed store, hash-verified

349}
350
351export function createPointerEvent(type, x, y) {
352 const event = new /*OK*/ CustomEvent(type, {bubbles: true});
353 event.clientX = x;
354 event.clientY = y;
355 event.pageX = x;
356 event.pageY = y;
357 event.touches = [
358 {
359 clientX: x,
360 clientY: y,
361 pageX: x,
362 pageY: y,
363 },
364 ];
365 return event;
366}
367
368export class ImagePixelVerifier {
369 constructor(windowInterface) {

Callers 7

createMouseDownEventFunction · 0.90
createMouseMoveEventFunction · 0.90
createMouseUpEventFunction · 0.90
createTouchStartEventFunction · 0.90
createTouchMoveEventFunction · 0.90
createTouchEndEventFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected