On 30 September 2014 00:33, Brendan Eich <[email protected]> wrote:
> Carl Smith wrote: > >> I still think the omission of some method for naming eval'ed code in the >> ES6 spec is unacceptable. It's not a nice-to-have that can be bundled with >> nicer stack objects, which are relatively unimportant [easily fixed with a >> regex]. >> > > See http://esdiscuss.org/topic/dynamic-compilation-including- > eval-and-script-tag-insertion-was-re-clean-scope and possibly other old > threads. JJB and I discussed, I forgot whether he implemented. Thanks Brendan [and for JavaScript]. That discussion, though interesting, seems to deal more with the implementation details, which went over my head a bit to be honest. Chrome currently supports named evals by concatenating `\n//# sourceURL=<filename>` to the string before passing it to `eval`. There's a longstanding ticket on FF for the pretty much the same thing [ https://bugzilla.mozilla.org/show_bug.cgi?id=583083]. The script tag workaround feels nasty in a shell, with lots of small inputs, and doesn't work for me ~ we use CoffeeScript. If the source URL hack, or some cleaner wrapper for it, was standardised, it'd make all the difference. Thanks again -- carlsmith
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

