MIME Test - CDATA Comment with JavaScript

Back to the MIME Type Tests.

To hide data from an XML parser, the data should be enclosed in a CDATA section. The following JavaScript function has been specified in the head of this document, enclosed in a CDATA section.

function cdataComment()
    alert('Enclosed in CDATA');

When served as application/xhtml+xml, the function should be executed. When served as text/html, the function is ignored. Test JavaScript Function in CDATA.