Open
Description
(notice that processing time ends after the paint/commit on main thread).
Note: I was using the experimental PR of Web Vitals Extension to test web-vitals.js v4 beta, but I didn't confirm that it has the latest and greatest version.
Example trace: https://trace.cafe/t/MUVKayAJwm
I think what miught be happening is that we are using the event renderTime as the end point and finding the last LoAF in that range, rather than using the event processing times? I'm not sure.
In order to reproduce here are the steps:
- Visit this site on a desktop device with a physical mouse pointer.
- Add a snippet of (see below)
- Interact with the "Custom Metrics Data"
<details>
element - You should notice a Jank (long INP). In the middle of the jank, move your mouse around to hover over things.
Snippet:
const EVENTS = [
"keydown",
"keyup",
"keypress",
// "pointerdown",
// "pointerup",
"pointercancel",
"touchstart",
"touchend",
"touchcancel",
// "mousedown",
// "mouseup",
"gotpointercapture",
"lostpointercapture",
// "click",
"dblclick",
"auxclick",
"contextmenu",
"pointerleave",
"pointerout",
"pointerover",
"pointerenter",
"mouseout",
"mouseover",
"mouseleave",
"mouseenter",
"lostpointercapture",
"dragstart",
"dragend",
"dragenter",
"dragleave",
"dragover",
"drop",
"beforeinput",
"input",
"compositionstart",
"compositionupdate",
"compositionend",
];
function block(ms) {
const target = performance.now() + ms;
while(performance.now() < target);
}
EVENTS.forEach(type => {
document.addEventListener(type, e => {
console.log(`Event type: ${type}`);
block(20);
});
});
Metadata
Metadata
Assignees
Labels
No labels
Activity