Trying to use cdata to store css but chrome throws “Uncaught SyntaxError: Unexpected token <” for the first line below:
var default_style = <![CDATA[
.TTContent table td.Mission img { max-height: 15px;}
]]>.toXMLString();
Does anyone knows why?
P.s. the css is much longer in reality
Many thanks,
Chrome has no E4X support. You can only hope to do this in Firefox (after you fix your syntax a bit I think).
code.google.com/p/v8/issues/detail?id=235 — “There are currently no plans for implementing E4X in V8”
The code is also incorrect for Firefox:
Firefox at least requires it to be wrapped in an XMLList:
var default_style = <><![CDATA[ .TTContent table td.Mission img { max-height: 15px;} ]]></>.toXMLString();