[wp-trac] [WordPress Trac] #59115: Use defer loading strategy for block view scripts
WordPress Trac
noreply at wordpress.org
Wed Aug 16 11:58:05 UTC 2023
#59115: Use defer loading strategy for block view scripts
--------------------------+--------------------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.4
Component: Editor | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: javascript, performance
--------------------------+--------------------------------------
Comment (by gziolo):
Noting that with [56398], the `defer` strategy is going to be used with
`editorScript`, `script`, and `viewScript`. In the case of `editorScript`,
the dependencies aren't using defer like `wp-block` or `wp-block-editor`,
so it will probably fall back to the legacy handling.
It might be fine as is, but we will have to watch whether 3rd party blocks
encounter any issues. If the intention was to apply that only to
`viewScript` then we need to add a check against `$field_name` in the
code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59115#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list