[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes

WordPress Trac noreply at wordpress.org
Tue Mar 13 00:33:29 UTC 2018


#12009: Add support for HTML 5 "async" and "defer" attributes
---------------------------+-----------------------------
 Reporter:  Otto42         |       Owner:  azaozz
     Type:  enhancement    |      Status:  reopened
 Priority:  normal         |   Milestone:  Future Release
Component:  Script Loader  |     Version:  4.6
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+-----------------------------

Comment (by westonruter):

 Replying to [comment:57 westonruter]:
 > Abort adding async/defer for scripts that have this script as a
 dependency. _doing_it_wrong()?

 On second thought, I don't think it should do this error auto-detection.
 Async scripts can still have dependencies, but they are not
 '''synchronous''' dependencies. In other words, there should be a
 dependency in place so that the async script gets printed as well as its
 (async) dependency; it's just that in the case of async scripts, the
 ''order'' doesn't matter. If we are going to do any such detection, we
 perhaps should flag when a '''non-async''' script gets printed which
 itself has an '''async''' script dependency. Or rather we should just not
 worry about warning at all since the developer will find a JS error when
 they test anyway.

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


More information about the wp-trac mailing list