[wp-trac] [WordPress Trac] #56470: viewScript setting does not set front end scripts for dynamic blocks

WordPress Trac noreply at wordpress.org
Mon Oct 3 22:16:20 UTC 2022


#56470: viewScript setting does not set front end scripts for dynamic blocks
-----------------------------+---------------------------------------------
 Reporter:  lovor            |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Script Loader    |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  ui, javascript, administration
  needs-testing              |
-----------------------------+---------------------------------------------

Comment (by gziolo):

 @davidbaumwald, I'm reporting that [54367] effectively resolves this
 issue. It will have to be included in the dev note for Block API changes
 in WordPress 6.1. We should also update the following section in the
 documentation:

 https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides
 /block-api/block-metadata.md#frontend-enqueueing

 In particular, the following section must be updated to reflect the
 changes applied:

 > viewScript (when the block defines render_callback during registration
 in PHP or a render field in its block.json, then the script is registered
 but the block author is responsible for enqueuing it)

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


More information about the wp-trac mailing list