Conditional Compilation Disabled

I get javascript error:

Conditional Compilation Disabled

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

/ @ cc_on @ /

I get a new, different javascript error:

Expected ')'

How to fix it? Thanks

+3
source share
1 answer

Here is a great piece of code, influenced by Dean Edwards , to determine if conditional comments are included:

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

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

+1
source

Source: https://habr.com/ru/post/1748104/


All Articles