On Mon, Nov 5, 2012 at 2:35 PM, Andrea Giammarchi < [email protected]> wrote:
> my point on namespaces was this one: everyone want's to use jQuery, then > underscore, then this or that ... then you need to be able to modify the > white list. Thanks for the clarification. jQuery and much else runs fine under SES, but requires more mechanism than a simple rejection of code that refers to global variables outside the whitelist. The basic confining-eval construct in the current SES implementation is currently called cajaVM.compileExpr: http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#617 cajaVM.compileExpr(src)(envObject) will redirect all apparently global variable references in src into property accesses on envObject. Yes, internally we use a "with" to implement that, though other tricks are possible. The only reason this is currently on "cajaVM" is that we're not yet ready to propose a std SES API, since the current one is based only on ES5. In std SES, this API would be provided by an ES6 module. -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

