Re: E4H compatible with string templates

Right, I keep forgetting (and apols to Hixie for assuming E4H used a 
full HTML parser).

However, for template strings the holes contain the results of 
evaluating arbitrary expressions. The html`...` handler would validate 
the results that fill each hole but only at runtime, of course.

/be

Tab Atkins Jr. wrote:
> On Thu, Mar 14, 2013 at 4:57 PM, Brendan Eich<brendan@secure.meer.net>  wrote:
>> Depending on what goes in the ${...} holes, though, the failure might
>> necessarily be runtime. Error is enough, and a sometimes-compile-time,
>> other-times-runtime error can be worse. In my experience, anyway.
>
> In Hixie's E4H proposal, the contents of the holes *never* causes an
> error.  You can only put a hole as an attribute value or element text
> contents (or just contents, if we also allow the hole's value to be
> DOM).  These can't ever fail - you'll just stringify (or append, if
> it's DOM).
>
> ~TJ

Received on Friday, 15 March 2013 00:16:43 UTC