This is no better or worse than:
"Is that JavaScript in an HTML comment inside a SCRIPT tag?" Which is exactly what the original JavaScript implementation was[0]. The HTML comment was to prevent browsers that did not support specific tags from choking on them. And the OBJECT tag has always used it's child elements to give configuration for the external resource it represents.
https://web.archive.org/web/20001101095326/http://www.javasc...
You can write HTML literals directly in Javascript in an ancient version of Firefox I forgot its name it's similar to JSX
Edit: It's called E4X. Thanks @woogley
It's crazy how similar this is with JSX
* Using a script tag,
* Whose contents began with a JavaScript comment,
* With the remainder of the JS-commented line beginning a CDATA block.
Then at the end of the script you'd have another JS-commented line to end the CDATA block.