[wp-trac] [WordPress Trac] #64097: Add load_on_client_navigation option to wp_register_script_module

WordPress Trac noreply at wordpress.org
Wed Oct 15 10:02:30 UTC 2025


#64097: Add load_on_client_navigation option to wp_register_script_module
-------------------------------+-----------------------------
 Reporter:  samueljseay        |      Owner:  samueljseay
     Type:  enhancement        |     Status:  assigned
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Interactivity API  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 In https://github.com/WordPress/gutenberg/issues/70873 we find the need to
 selectively pre-load script modules for client side navigation with
 interactivity API's router to ensure that we don't load modules that are
 not needed.

 To that end, we should add a `load_on_client_navigation` option in the
 `$args` of `wp_register_script_module` that can be selectively enabled for
 interactivity API blocks as suggested in the solution presented here:
 https://github.com/WordPress/gutenberg/issues/70873#issuecomment-3377500106

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64097>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list