[wp-trac] [WordPress Trac] #54018: Allow scripts registered via block.json to be enqueued in the footer

WordPress Trac noreply at wordpress.org
Wed Apr 26 23:58:57 UTC 2023


#54018: Allow scripts registered via block.json to be enqueued in the footer
---------------------------+------------------------------
 Reporter:  jeremyfelt     |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  performance
---------------------------+------------------------------

Comment (by westonruter):

 I just discovered that because the File block's
 [https://github.com/WordPress/gutenberg/blob/61bbcd02c19fa0109378bd1eda2b34e1a154a24a/packages
 /block-library/src/file/view.js view script] is loaded in the `head` (as
 other blocks' scripts are), it is currently failing hide PDF embeds for
 unsupported browsers because it doesn't wait to do so until the page
 loads. I opened a [https://github.com/WordPress/gutenberg/pull/50113 PR]
 to fix. Naturally this issue wouldn't have happened if the script were
 loaded in the footer, and maybe it used to be in the footer and this is a
 regression.

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


More information about the wp-trac mailing list