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

Function getMaxFirstInputDelay

testing/amp-performance-extension/measure.js:66–79  ·  view source on GitHub ↗
(firstContentfulPaint)

Source from the content-addressed store, hash-verified

64}
65
66function getMaxFirstInputDelay(firstContentfulPaint) {
67 let longest = 0;
68
69 longTasks.forEach((longTask) => {
70 if (
71 longTask.startTime > firstContentfulPaint &&
72 longTask.duration > longest
73 ) {
74 longest = longTask.duration;
75 }
76 });
77
78 return longest;
79}
80
81function getMetric(name) {
82 const entries = performance.getEntries();

Callers 1

measure.jsFile · 0.85

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected