[wp-trac] [WordPress Trac] #59115: Use defer loading strategy for block view scripts
WordPress Trac
noreply at wordpress.org
Wed Aug 16 17:04:39 UTC 2023
#59115: Use defer loading strategy for block view scripts
--------------------------+--------------------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.4
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript, performance
--------------------------+--------------------------------------
Changes (by westonruter):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:5 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.
Good catch. It was intended to only apply to the `viewScript`. I'll open a
new PR to fix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59115#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list