just a little question about this comment I found on an ebook about HTML5: /*@cc_on!@*/0 this comment should be somehow bound to the recognition of the IE browser in order to use the document.createElement() to create the unrecognized HTML5 elements, but I didn't find useful infos about the meaning of how this works cause even the author doesn't explain it. Could someone explain me what it is and what it does, please?
Thanks for the attention!
EDIT:
in the ebook the author says:
The next example demonstrates how to solve the problem for all the new elements introduced in HTML5. Here we include all the elements we’d like to force IE to recognize:
And here is the code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Styling Unknown Elements - 3</title>
<script>
(function() {
if (! /*@cc_on!@*/ 0)
return;
var e = "abbr,article,aside,audio,canvas, datalist,details,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output, progress,section,time,video".split(','),
i = e.length;
while (i--) {
document.createElement(e[i]);
}
})()
</script>
<style>
time {
font-style: italic;
}
</style>
...
Sorry for the horrible indentation but I am using a tablet. Anyway please take a look at the script tag and at that if condition.