Encyclopedia / JavaScript
Events
Signals like click, input, scroll and keydown.
Scripts listen for events and react. Long-running event handlers block the main thread, and the page feels frozen. That delay is what INP (Interaction to Next Paint) measures.
button.addEventListener('click', () => {
panel.hidden = !panel.hidden;
});
Related terms
Where it shows up in a page load
- Step 10: JavaScript makes it interactive. Scripts run, attach event listeners and may fetch more data from an API. How quickly the page responds to a tap is INP, another Core Web Vital.
Watch the full request journey →
More in JavaScript
What happens when someone clicks, types or scrolls.