Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Yes, IE11 has removed javascript conditional compilation</h2> <hr> <p>The <a href="https://www.google.com/search?q=ie11+javascript+conditional+compilation" rel="noreferrer">google search</a> linked in the question returns this question as its third result, after two MSDN pages also linked above. This establishes the lack of a better source, so I think this question (including comments) should be considered the authoritative reference for the fact that Javascript conditional compilation is not available in IE11.</p> <p>I have submitted feedback on the MSDN pages to the effect that they are incorrect.</p> <p><strong>Update 2015-02-03</strong>: <a href="https://msdn.microsoft.com/en-us/library/ie/8ka90k2e%28v=vs.94%29.aspx" rel="noreferrer">MSDN</a> now acknowledges that IE11 no longer supports <code>@cc_on</code>.</p> <hr> <p>Some workarounds are as follows:</p> <p><strong>User-agent detection</strong></p> <pre><code> /\([^)]*Trident[^)]*rv:([0-9.]+)/.exec(ua) </code></pre> <p>will parse IE11's UA string and return the "revision number" at the end.</p> <p><strong>ScriptEngineMajorVersion()</strong> (thanks @Teemu)</p> <pre><code> var tridentVersion = typeof ScriptEngineMajorVersion === "function" ? ScriptEngineMajorVersion() : undefined </code></pre> <p>should evaluate correctly on all browsers, but we can't guarantee <code>ScriptEngineMajorVersion</code> will not be dropped without warning just as conditional compilation has been.</p> <hr> <p>Thanks to all commenters.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload