On Mon, Jan 4, 2010 at 2:09 PM, Mathias Wagner <[email protected]>wrote:

> Hello,
>
> I am a student of computer science and want to implement a "jail" for
> java-script or at least gather some information how one could do
> that.


Have a look at Caja:  http://code.google.com/p/google-caja/

This allows Javascript to be sandboxed within a web page and it works on
today's browsers.  It involves a fair amount of slowdown, but in future
ES5's strict mode will allow faster Caja implementations.

There are basically two approaches to sandboxing ES code [1]:
within-Ecmascript language-based approaches (e.g. Caja, ADsafe, WebSandbox,
FBJS) and DOM/browser-based approaches (e.g. iframes).  I suspect that the
language-based approaches will win in the long term because they can evolve
more rapidly and have multiple competing implementations.

Cheers,
Mark

[1] https://mail.mozilla.org/pipermail/es-discuss/2009-December/010303.html

-- 
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev

Reply via email to