[wp-trac] [WordPress Trac] #59115: Use defer loading strategy for block view scripts

WordPress Trac noreply at wordpress.org
Thu Aug 17 08:54:23 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
--------------------------+--------------------------------------

Comment (by gziolo):

 It's very likely that both plugins don't use `register_block_type` with
 `block.json` that defines `editorScript` or `script`. It's the regular
 path when `register_block_script_handle` gets called. I can at least see
 that it's the case for Syntax-highlighting Code Blocks. Many plugins still
 manually enqueue the script that registers the block on the client.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59115#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list