Tried several pre-compilation tricks as well, and it still renders things out
as text, and I think that's a result of the CDATA being XML whereas that
data is rendered and read differently in the browser.

I have read Mr. Shipp's blog about JS and the 5.4 release. I would love to
know more about his plans for HTML/JS templating and where HTML5 support is
heading. Having everything rendered out as perfectly formed XML is great for
tag completion and validation, but I think takes away some fundamental tool
sets and uniqueness that HTML5 brings. And one of those is the ability to
throw in content in a script tag that ignored by the browser. John Resig,
the creator of jQuery covers it wonderfully here:

http://ejohn.org/blog/javascript-micro-templating/

I'll quote this phase:

/"Quick tip: Embedding scripts in your page that have a unknown content-type
(such is the case here - the browser doesn't know how to execute a text/html
script) are simply ignored by the browser - and by search engines and
screenreaders. It's a perfect cloaking device for sneaking templates into
your page. I like to use this technique for quick-and-dirty cases where I
just need a little template or two on the page and want something light and
fast."/

If the goal is to move to a more modern JS architecture, I would pose that
having micro templating is crucial, and needs to be accounted for in
Tapestry. Quite simply, forcing the client side developer into an XML style
validation for this shouldn't be necessary. I'd love to see an option to
flag the t:content as some type of script/other so that validation is turned
off. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-and-inline-Handlebars-js-tp5660756p5662818.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to