Facebook and Google have teamed up to create an Application Programming Interface (API) in the Chrome browser with the intention of speeding up the user experience, and making it smoother. This particular API aims to shorten the reaction times between a user input and the browser’s reaction, TechCrunch reported.
“At Facebook, we measure events at four stages: the moment the operating system gets the input, the moment we actually start processing it, the moment we start showing changes on the screen in response to the event, and the moment we finish processing it. As we looked at our top interactions, we noticed that queueing time was causing one of the biggest delays,” the company said.
“Queuing refers to the time between when a person interacts with a page (e.g., clicks or types) and when we actually start processing the event. In extreme cases, this delay can be frustrating. Imagine clicking a notifications icon, then having to wait a full minute for the button to indicate that it registered your click. You probably wouldn’t wait for it to finish loading.”
The engineers created the isInputPending API, which lets developers check whether any inputs are pending while also executing code.
“The process of bringing isInputPending to Chrome represents a new method of developing web standards at Facebook,” Facebook said. “We hope to continue driving new APIs and to ramp up our contributions to open source web browsers. Down the road, we could potentially build this API directly into React’s concurrent mode so developers would get the API benefits out of the box. In addition, isInputPending is now part of a larger effort to build scheduling primitives into the web.”