Skip to content

Commit

Permalink
Fix Typo in Interactivity Api Reference (WordPress#63775)
Browse files Browse the repository at this point in the history
Replacing _reqired_ to _required_

Co-authored-by: widoz <[email protected]>
Co-authored-by: juanmaguitar <[email protected]>
  • Loading branch information
3 people authored Jul 21, 2024
1 parent 959e8e0 commit 645c0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/interactivity-api/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ const { state } = store("myPlugin", {
});
```

As mentioned above with [`wp-on`](#wp-on), [`wp-on-window`](#wp-on-window), and [`wp-on-document`](#wp-on-document), an async action should be used whenever the `async` versions of the aforementioned directives cannot be used due to the action requiring synchronous access to the `event` object. Synchronous access is reqired whenever the action needs to call `event.preventDefault()`, `event.stopPropagation()`, or `event.stopImmediatePropagation()`. To ensure that the action code does not contribute to a long task, you may manually yield to the main thread after calling the synchronous event API. For example:
As mentioned above with [`wp-on`](#wp-on), [`wp-on-window`](#wp-on-window), and [`wp-on-document`](#wp-on-document), an async action should be used whenever the `async` versions of the aforementioned directives cannot be used due to the action requiring synchronous access to the `event` object. Synchronous access is required whenever the action needs to call `event.preventDefault()`, `event.stopPropagation()`, or `event.stopImmediatePropagation()`. To ensure that the action code does not contribute to a long task, you may manually yield to the main thread after calling the synchronous event API. For example:

```js
// Note: In WordPress 6.6 this splitTask function is exported by @wordpress/interactivity.
Expand Down

0 comments on commit 645c0e7

Please sign in to comment.