Alternative to Mozilla's eval in a scope

ihab.awad at ihab.awad at
Sun Dec 13 22:23:15 PST 2009

On Sun, Dec 13, 2009 at 10:17 PM, Andy Chu <andy at> wrote:
> If Caja has already done something along these lines then awesome --
> I'm just asking if there is discussion about standardizing such a
> thing.

Kris Kowal coined the term "hermetic eval" to describe what you are
talking about.

> You could implement a module system on top of that ...

That's the idea. :)

>> In the Caja project, our "isolated evaluator" is implemented to return
>> the value of the last ExpressionStatement in the code. In other words,
>> the loaded code is more easily able to defend its *own* integrity
>> since its top-level vars are private to it.
> Where is this documented?  I've looked at the Caja site but don't see it.

Unfortunately, the Caja module system is not well documented right
now. We have not deployed it widely yet since none of our immediate
customers need it. But I hope we can make it more popular, perhaps on
the heels of an ES-Harmony proposal....



Ihab A.B. Awad, Palo Alto, CA

More information about the es-discuss mailing list