> var myTmpl = tmpl`Dear ${{first}} ${{last}}`; // (*)
> alert(myTempl.render({ first: "Jane", last: "Doe" }));
> 
> The handler (at (*)) is called like this:
> tmpl(callSiteId73654, { first: undefined }, { last: undefined });
> 
> BTW: won’t it be a problem (for this use case) if the variables first and 
> last don’t exist?
> 
> It would indeed be a problem. How much does this matter?

It only matters if template generation (jQuery templates etc.) works as 
sketched above. However tests quasis for their ability to support jQuery 
templates must have a solution in mind that works.

I would expect templating (however it is implemented) to be a frequent use 
case, given how many templating engines are out there and given how elegant a 
solution quasi-literals are.

-- 
Dr. Axel Rauschmayer

[email protected]
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to