INNER CODE UNIT · TypeScript
onClick
okasi/bot-signal · src/behavioral/index.ts:162
const onClick = (event: Event): void => {
const mouseEvent = event as MouseEvent;
record<ClickSample>(samples.clicks, {
x: mouseEvent.clientX,
y: mouseEvent.clientY,
t: Date.now(),
isTrusted: mouseEvent.isTrusted,
detail: mouseEvent.detail,
pageX: mouseEvent.pageX,
pageY: mouseEvent.pageY,
screenX: mouseEvent.screenX,
screenY: mouseEvent.screenY,
isFullscreen: context.outerHeight - context.innerHeight <= 1,
});
};
/**
* Every touch is recorded, so tap-driven clicks stay exempt and untrusted