On Mon, Jul 28, 2014 at 11:16 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 7/28/14, 11:09 AM, Rick Waldron wrote: > >> var y = x.replace('{{blob}}', function() { >> return data; >> }); >> > > In fairness, that's the sort of thing that gives off a "WAT smell". Code > like this without a comment that explains the indirection is just asking > someone to "simplify" it, breaking it in the process... I don't disagree with your feedback, but JS has had special semantics for "$" (with ’ or n) character in the replaceValue since ES3 (just short of 15 years). I didn't say that the solution was obvious, just that it required familiarity ;) Rick
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss