[wp-trac] [WordPress Trac] #45626: AMD (Asynchronous Module Definition) for core

WordPress Trac noreply at wordpress.org
Thu Dec 13 15:57:47 UTC 2018


#45626: AMD (Asynchronous Module Definition) for core
---------------------------+-----------------------------
 Reporter:  nextendweb     |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:
 Severity:  normal         |   Keywords:
  Focuses:  javascript     |
---------------------------+-----------------------------
 I'm sure it was requested in the past, but I haven't found that ticket. It
 would be great in the future if WordPress would include AMD officially.
 [https://github.com/amdjs/amdjs-api/blob/master/AMD.md]

 There are several different plugins in the directory which can place
 scripts into the footer or make them async on the fly. Currently if a
 shortcode outputs a script tag into the post which depends on jQuery, but
 another plugin pushed jQuery into the footer or made async, then the
 script will fail and developer must create workarounds to solve this
 issue.

 If there would be an official module loader, then developers could inject
 their JavaScript codes with dependencies into the source code and there
 would be no failure even in very rare cases.

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


More information about the wp-trac mailing list