Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional compilation is turned off

Tags:

javascript

I get a javascript error:

Conditional compilation is turned off

I found this link to fix : http://msdn.microsoft.com/en-us/library/5y5529x3(VS.90).aspx But after adding this field

/@cc_on @/

I get new, another javascript error:

Expected ')'

How to fix it? Thanks

like image 470
Oleg Sh Avatar asked Dec 04 '25 15:12

Oleg Sh


1 Answers

Here is a great piece of code, influenced by Dean Edwards, to determine whether or not conditional comments are enabled:

var allowsCC = /*@cc_on!@*/!1;
if(allowsCC)
  alert("Conditional comments are allowed!!!");
else
  alert("Conditional comments are not allowed.");

As you may have already determined, allowsCC will be set to a boolean value which indicates whether or not conditional comments are allowed.

like image 165
Chris West Avatar answered Dec 07 '25 05:12

Chris West



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!