Quasi-literals for templating?
mikesamuel at gmail.com
Mon Jun 13 23:01:29 PDT 2011
2011/6/12 Axel Rauschmayer <axel at rauschma.de>:
> Quasi-literals look like they could be used for templating (similar to jQuery templating ). For example, to turn JSON data into HTML.
Yep. Take a look at
and try selecting "Safe HTML" from the dropdown at the top-right.
I'm also trying to make sure that the jquery templates spec (
http://wiki.jqueryui.com/w/page/37898666/Template ) integrates well.
> Has that been considered as a use case (e.g. after a compilation/generation step?). But it doesn’t seem like identifier names are accessible to quasi handlers, which would make this difficult.
If the consensus ends up being that more than simple identifiers are
allowed in substitutions, then I don't know what it would mean for
identifiers to be available.
But more meta-data could be attached to the call site object.
> BTW: “Desugaring” at the beginning of “Semantics” seems mangled.
Thanks. Will fix.
>  http://api.jquery.com/template
> Dr. Axel Rauschmayer
> axel at rauschma.de
> home: rauschma.de
> blog: 2ality.com
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss