You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Zhou edited this page Feb 12, 2016
·
3 revisions
Using Internet Explorer's "conditional compilation" with Closure Compiler
Introduction
Closure Compiler does not natively support Internet Explorer's conditional compilation, however it is still possible to use them in a limited way.
Details
IE's conditional compilation can not be used directly, but they can be used in eval conditions. As an example, one common use is to detect Internet Explorer:
varis_ie=/*@cc_on!@*/false;
This can be rewritten to be compatible with Closure Compiler in this way:
varis_ie=eval("/*@cc_on!@*/false");
The rules for using this solution are the same for the use of eval in general.