IE10 (Internet Explorer 10) Detection via @_cc_ Conditional Compilation | UA - User Agents

Standards Based Development

Append .ie10 to head


<style>
.example{width:64px; height:64px; margin:10px auto}
.ie10 .example{background:url("http://dev.bowdenweb.com/ua/browsers/ie/i/ie10-windows-8-icon-a-64.png") 0 0 no-repeat}
</style>
<!--[if !IE]><!--><script>if(/*@cc_on!@*/false){document.documentElement.className+=' ie10';}</script><!--<![endif]-->

Detect @_jscript_version and Windows Version

yo son, i'm ie10desktop

yo son, i'm ie10metro! why the fuck would you want to view source or my dom? clippy says suck my balls.


      /*@cc_on @*/
/*@
    document.write("<p>JavaScript version: " + @_jscript_version + ".</p>");
    @if (@_win64)
        document.write("<p>Running on the 64-bit version of Windows.</p>");
    @elif (@_win32)
        document.write("<p>Running on the 32-bit version of Windows.</p>");
    @elif (@_win16)
        document.write("<p>Running on the 16-bit version of Windows.</p>");
    @else
        document.write("<p>Running on a different operating system.</p>");
    @end
@*/

References and Resources