Symbols, Protocols, Frames, and Versioning

Dean Landolt dean at deanlandolt.com
Wed Oct 3 17:09:49 PDT 2012


On Wed, Oct 3, 2012 at 5:09 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Domenic Denicola wrote:
>
>> Would it suffice to allow cross-frame sharing of symbols via postMessage
>> and its structured clone algorithm? They're immutable, right?
>>
>
> They are immutable but you'd still have to pass your @iterator to another
> same-origin frame, and then have to use it carefully when iterating objects
> from the first frame. This is unusable.
>
> Making @iterator a singleton (to the limits of observability: same-origin,
> CORS, out-of-process-via-DOM window.open in IE9+ notwithstanding!) can be
> done. That wins, no need to pass and use the other frame's @iterator symbol.
>
> But how to let users create such singletons?
>
>
The module system does this for us, doesn't it? I can't really see the
problem -- anywhere you can share objects with private symbols you can
always provide the symbols themselves. Module sandboxes will come in handy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121003/93b6cc10/attachment.html>


More information about the es-discuss mailing list