[wp-trac] [WordPress Trac] #16024: Conditional Comments for JS

WordPress Trac noreply at wordpress.org
Mon Feb 3 03:29:33 UTC 2014


#16024: Conditional Comments for JS
-------------------------------------+-----------------------------
 Reporter:  filosofo                 |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Script Loader            |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  template
-------------------------------------+-----------------------------

Comment (by retlehs):

 IE6/IE7 aren't really an issue at this point, but IE8 will be sticking
 around for a while. It's more important to have this ability for JS than
 it is to have it for CSS now. There's a lot of shims/shivs/polyfills these
 days — whenever a browser lags behind there's almost always going to be
 better to fix with JS rather than CSS.

 twentyeleven through twentyfourteen use the following code in the header
 template:

 {{{
 <!--[if lt IE 9]>
 <script src="<?php echo get_template_directory_uri();
 ?>/js/html5.js"></script>
 <![endif]-->
 }}}

 Seems like it would be better to have that handled where all the other
 theme JS is enqueued.

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


More information about the wp-trac mailing list