Page MenuHomePhabricator

JavaScriptMinifier should preserve IE's "Conditional compilation" statements
Closed, DeclinedPublic

Description

Author: mdale

Description:
the syntax /*@cc_on*/ is sometimes used to conditionally add content to IE browsers see:
http://www.javascriptkit.com/javatutors/conditionalcompile.shtml

Its useful in cases where client detection library is not ready yet or you need to do user-agent independent IE conditionals.

Minification in resource loader should probably ignore striping comments that include /*@cc_on at the start. and @/ at the end.


Version: 1.17.x
Severity: enhancement

Details

Reference
bz25575

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:22 PM
bzimport set Reference to bz25575.
bzimport added a subscriber: Unknown Object (MLST).

Yes, this is brilliant! More JSMin tweaks to make I guess...

Use of /*@cc_on @*/ is mainly for old IE. As of writing, we no longer support Grade A JavaScript run-time in IE6, IE7, IE8 or IE9. Support for /*@cc_on @*/ was removed in IE 11. IE 10 still support it for back-compat, but I don't think it makes sense to introduce support for this deprecated feature at this point in time.