[wp-trac] [WordPress Trac] #60597: Script Modules API: Allow list of enqueued module data to be exposed

WordPress Trac noreply at wordpress.org
Tue Sep 17 10:33:50 UTC 2024


#60597: Script Modules API: Allow list of enqueued module data to be exposed
---------------------------+-----------------------------
 Reporter:  johnbillion    |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Script Loader  |     Version:  6.5
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+-----------------------------

Comment (by jonsurrell):

 The use case I've wanted most often is a method to know what Script
 Modules are "available" - either enqueued themselves or part of the import
 map because they're in the dependency graph.

 In https://github.com/WordPress/gutenberg/pull/65380, the use case was "is
 this specific module available."

 Previously, [https://github.com/WordPress/gutenberg/pull/61658 I needed a
 way to iterate through all available Script Modules]. That implementation
 moved to Core in [58579] and was able to access private methods to achieve
 its goal.

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


More information about the wp-trac mailing list