-
Notifications
You must be signed in to change notification settings - Fork 833
Closed
Copy link
Labels
Enhancement[Focus] BlocksIssues related to the block editor, aka Gutenberg, and its extensions developed in JetpackIssues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack[Focus] Performance[Pri] Normal[Type] EnhancementChanges to an existing feature — removing, adding, or changing parts of itChanges to an existing feature — removing, adding, or changing parts of it
Description
Since WordPress 6.3, one can enqueue scripts on the frontend of a WordPress site while defining defer
or async
:
https://make.wordpress.org/core/2023/07/14/registering-scripts-with-async-and-defer-attributes-in-wordpress-6-3/
We currently leverage this for some of our scripts, but not for any of the scripts enqueued alongside blocks:
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
It would be nice to add that option there. Maybe this is something that should be passed on block registration, in Blocks::jetpack_register_block()
?
Related conversation: #44532
the JS for the Subscribe block is a non-defer classic script:
dilirity and westonruter
Metadata
Metadata
Assignees
Labels
Enhancement[Focus] BlocksIssues related to the block editor, aka Gutenberg, and its extensions developed in JetpackIssues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack[Focus] Performance[Pri] Normal[Type] EnhancementChanges to an existing feature — removing, adding, or changing parts of itChanges to an existing feature — removing, adding, or changing parts of it