On Nov 5, 2010, at 12:33 PM, Sam Tobin-Hochstadt wrote:

> On Fri, Nov 5, 2010 at 3:27 PM, Brendan Eich <[email protected]> wrote:
>> 
>>> Can't that default module loader be overriden?
>> 
>> In the browser, *maybe*. I'll let Sam take this one, but obviously different 
>> embeddings have different trust models and constraints on loaders.
> 
> Again, you can create and use new (or existing) module loaders, but
> you can't change the behavior of your context.  That is, a program
> can't change what restrictions are imposed on it, but it can impose
> additional restrictions on new contexts that it creates.

Thanks, this is an important point to keep clear.

There definitely is interest in support secure subsets with whitelisting module 
loaders, e.g. As you say, their confined world of differently-typed scripts 
will need to be bootstrapped from a <script> tag and that has a loader than 
can't be rewired.

It seems plausible to me that the web page/app context's 
script-type-to-module-loader mapping could be configured for types other than 
the built-in ones. Then you could write

<script type="application/ses">
...
</script>

and use a non-default "Secure ECMAScript" module loader. But I haven't thought 
through all the security angles, by a long shot.

/be

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

Reply via email to