Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Performance, Javascript scripts should be enqueued with Defer #314

Closed
NeilWJames opened this issue Sep 22, 2023 · 1 comment
Closed

Comments

@NeilWJames
Copy link
Collaborator

WP 6.3 introduced the notion of enqueueing Javascript scriots with the Defer attribute to give a performance benefit.

Since the plugin script provide funtionality that is only invoked after the page is loaded (as code is invoked on the basis of user interaction), the plugin code can take advantage of this.

Following the advice given in WordPress Core, because the parameter used for WP 6.3 will be treated as true - the previous value. Therefore this coding will work as previously with older versions of WP.

@NeilWJames
Copy link
Collaborator Author

Fixed with commit [d63c63e]
Merge branch 'main' of https://github.com/NeilWJames/wp-document-revisions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant