[wp-trac] [WordPress Trac] #22249: Add ability to set or remove attributes on enqueued scripts and styles.

WordPress Trac noreply at wordpress.org
Tue Oct 26 08:17:05 UTC 2021


#22249: Add ability to set or remove attributes on enqueued scripts and styles.
-------------------------------------------+-----------------------------
 Reporter:  ryanve                         |       Owner:  (none)
     Type:  enhancement                    |      Status:  assigned
 Priority:  normal                         |   Milestone:  Future Release
Component:  Script Loader                  |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  early has-patch needs-testing  |     Focuses:
-------------------------------------------+-----------------------------

Comment (by emrancu):

 Hi There,
 We need to add custom attribute specially type="module" for Modern
 JavaScript. Specially when we work with React JS, Vue JS, Vite Build Tool
 then we must need type="module" in script.

 But There is no direct option for setting custom attribute to script tag.

 I have completed the task in [https://github.com/WordPress/wordpress-
 develop/pull/1775] PR.

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


More information about the wp-trac mailing list