[was ...]

Sam Tobin-Hochstadt samth at
Tue Jul 10 04:40:08 PDT 2012

On Tue, Jul 10, 2012 at 7:36 AM, Aymeric Vitte <vitteaymeric at> wrote:
> I have given some examples, surprising that nobody else reacts with other
> examples. One of the use could be to be able to do the very simple thing :
> var f=function() {
>     var a={};
>     var cb=function(code) {System.eval(code);console.log(a.b)};
>         //url's code --> a.b='b';
> }
> Where System.eval does a simple eval if url is not a module.

Right, that's what `loader.eval` is specified to do for module loaders.

> Or something like that, why do we have the eval(src) possibility in the
> proposal if we can not fetch src ?

Because browser embeddings of JS *already* provide XHR.  If you don't
like the XHR API (I certainly am not a fan), then there are places to
talk about that.

sam th
samth at

More information about the es-discuss mailing list