Cross-global instanceof

Oliver Hunt oliver at apple.com
Thu Oct 31 19:41:22 PDT 2013


On Nov 1, 2013, at 2:46 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:

> Allen, in which place on current known universe, when you parse a JSON.string, your reviver function receives objects from another realm, exactly?
Please try to keep the discourse polite.

That said this is fairly trivial

<realm a>
function reviver(…) { … }
</>

<realm b>
JSON.parse(… <realm a>.reviver …)
</>

now the realm of the objects created by the JSON object differ from the realm that the reviver function is working in.

—Oliver





More information about the es-discuss mailing list