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

Use the new WP core method of adding defer/async to JavaScript assets #2268

Open
chrisblakley opened this issue Nov 13, 2023 · 0 comments
Open
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc). Frontend (Script) Related to the client-side JavaScript.
Milestone

Comments

@chrisblakley
Copy link
Owner

chrisblakley commented Nov 13, 2023

Nebula has a Rube Goldberg machine of a way to async/defer JavaScript assets, but now as of WP core 6.3 they are no longer needed. This will reduce the complexity of registering Nebula assets. However, some of the functionality will still be needed for module scripts and crossorigin assets, so we'll need to surgically remove the vestigial functionality.

Documentation for the new wp_register_script() function: https://make.wordpress.org/core/2023/07/14/registering-scripts-with-async-and-defer-attributes-in-wordpress-6-3/

Screen Shot 2023-11-13 at 4 33 01 PM

Screen Shot 2023-11-13 at 4 32 58 PM

@chrisblakley chrisblakley added Backend (Server) Related to the server-side (includes PHP, HTML, etc). Frontend (Script) Related to the client-side JavaScript. labels Nov 13, 2023
@chrisblakley chrisblakley added this to the 12.0 Flame milestone Nov 13, 2023
@chrisblakley chrisblakley modified the milestones: 12.0 Flame, 13.0 Bubble May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc). Frontend (Script) Related to the client-side JavaScript.
Projects
Optimization
Awaiting triage
Development

No branches or pull requests

1 participant