http://codereview.appspot.com/4530099/diff/13001/src/com/google/caja/plugin/caja.js File src/com/google/caja/plugin/caja.js (right):
http://codereview.appspot.com/4530099/diff/13001/src/com/google/caja/plugin/caja.js#newcode292 src/com/google/caja/plugin/caja.js:292: imports.id___ = +('' + Math.random()).substr(2); So the problem is that the ___.getId() in any given taming frame does not return a unique value? Ok, then how about removing ___.getId() and ___.getImports() *entirely* from es53.js? Then, when caja.js initializes a taming frame, it *injects* a reference to a ___.getId() and a ___.getImports() provided by caja.js, which allocate *globally* unique references. In that way, caja.js can also maintain a table to remember which frame a given set of imports came from as well, and use that to advantage. would _that_ work? http://codereview.appspot.com/4530099/
