Playground for the quasi strawmen
Mike Samuel
mikesamuel at gmail.com
Tue Mar 15 15:06:14 PDT 2011
I put together a playground so you can interactively experiment with
the quasi strawman syntax while I update the draft spec.
Take a look at http://js-quasis-libraries-and-repl.googlecode.com/svn/trunk/index.html
It's a REPL derived from the squarefree shell which desugars the input
before eval-ing it.
You can get started with some canned example code available from a
drop-down at the top right.
There's a few quasi-handlers built in:
safehtml - this does contextual auto-escaping of dynamic value in HTML
msg - this implements quite a bit of Shanjian's String.format
proposal, but on top of quasis.
html_msg - this demonstrates that it is possible to write quasi
handlers that compose using a simple shim, so quasis do not force you
to choose between having composed content be secure or i18n-able.
raw - a simple quasi handler that gets python style raw strings.
cheers,
mike
(I debugged this on a number of browsers, but I haven't had a change
to try a lot of older, smaller, mobile, or OS-specific browsers.)
More information about the es-discuss
mailing list