Updates to the Interactivity API in 6.6

Date:

The Interactivity API development for WordPress 6.6 has been focused on maintenance. Its updates include new features and directives, a better debugging experience, and improved code quality.

Table of Contents New async directives

WordPress 6.6 includes three new directives aimed at improving performance:

data-wp-on-async data-wp-on-async-document data-wp-on-async-window

These async directives optimize event callbacks by first yielding to the main thread. That way, complex interactions won’t contribute to long tasks, improving the Interaction to Next Paint (INP). You can read more about this approach in Optimize Interaction to Next Paint.

These directives are recommended over the sync ones (data-wp-on, data-wp-on-document, and data-wp-on-window), but you can use them only when

This is the first part of the article

Updates to the Interactivity API in 6.6

wpforms banner