Opened 2 years ago
Last modified 2 years ago
#61356 new enhancement
Add $is_module as an extra strategy argument when enqueueing js script.
| Reported by: | itumulak | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Script Loader | Version: | 6.6 |
| Severity: | normal | Keywords: | 2nd-opinion dev-feedback |
| Cc: | Focuses: | javascript, sustainability |
Description
With Modules API not able to utilize wp_localize_script, would it make sense to add an is_module option as another argument for wp_enqueue_script or wp_register_script? When set to true, type="module" is added in the script tag.
I have created my own Script Module class so that I can use JavaScript modules and localize scripts. See here.
First time here. Feedback is very welcome.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This is related to #60234 and #60647.