Microsoft is making some major improvements to the way inking is handled in Edge, thanks to a new Ink API and a new API in Windows 11. The company first announced these improvements at Build 2021, but now, they're available to try for users running Edge Dev. With these changes, Microsoft says it has seen an improvement of up to 240% in latency using Windows 11.

First, the new Ink API is a top-level API for web developers, which they can implement to enable support for inking. This has been implemented upstream in the Chromium project, too, so other Chromium-based browsers can also benefit from this. The Ink API only requires two steps: acquiring an InkPresenter object from the browser and notifying the InkPresenter object of the last pointer event from the device. During the first step, the new Ink API makes it so that the web application calls for an OS-backed rendering instance or for a native browser-backed polyfill instance.

That's where Windows 11 comes into play. On Windows 11, Microsoft Edge will be able to use a new API that allows the web application to interface directly with the operating system's compositor to draw ink. That means pointer events don't have to go through the browser process itself, removing some of the delay that's usually added when inking on the web. This is the OS-backed rendering instance mentioned above.

Inking improvements in Microsoft Edge

On operating systems that don't have this API, such as Windows 10 and Linux, the Ink API will instead use a polyfill instance implemented directly in the browser. This will allow Edge to provide predictive rendering of ink strokes based on the latest pointer information. This isn't as responsive as the implementation in Windows 11, but it should still be much better than the current implementation of ink.

This new Ink API and its benefits should now be available in the latest version of Edge in the Dev channel, as well as the Canary channel. Since the change has been implemented upstream in Chromium, other browsers using the latest Chromium code should also have this feature included and enabled by default. If you're interested in learning more about the API, you can visit the specification draft on GitHub.