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

WordPress Trac noreply at wordpress.org
Sat Dec 7 19:22:46 UTC 2013


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

Comment (by retlehs):

 Replying to [comment:40 georgestephanis]:
 > In hindsight, I'm not 100% sold on this, primarily because IE10 has
 dropped support for conditional comments entirely.  So this would be
 adding a new feature for old tech, which I'm not sure is the best idea.
 >
 > I mean, I like having a better system to deal with it, but it feels like
 we'd be moving backwards.  Yay consistency and all, but ... ?
 >
 > Thoughts?

 There's no need for conditionals for newer IE's, but there are a lot of
 instances where old IE's need it. Older IE's are still going to be around
 for a while, and whether or not WordPress drops support for them shouldn't
 have an effect on being able to add conditionals for JS.

 I'm all for dropping support for anything but modern browsers in the
 admin, but lots of visitors to our [corporate] sites are still on IE8
 (thanks, IT departments). Right now it's not possible to properly enqueue
 a polyfill such as Respond.js to just older IE's:
 https://github.com/scottjehl/Respond

 I can't think of a reason why it'd be a bad idea to add support for adding
 conditionals to enqueued JS & it makes no sense that it's not consistent
 with enqueuing CSS.

 Also, reference #13592

--
Ticket URL: <http://core.trac.wordpress.org/ticket/16024#comment:57>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list