Oliver Hunt (2013-11-01T06:54:38.000Z)
domenic at domenicdenicola.com (2013-11-12T18:52:18.205Z)
On Nov 1, 2013, at 7:23 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote: > also, your reviver would receive objects from the realm I am checking with that code ... so your reviver will receive object from the **expected** realm ... just to clarify, for future readers. > I don’t understand what you’re saying here if your reviver is in realm A, and says ```js function reviver(foo) { … if (foo instance of Array) alert(“Array!”) ... } ``` And realm B says ```js JSON.parse(…, realm A.reviver) ``` You will never get to the alert. As far as use cases, i recall multiple websites using invisible iframes as “modules” where multiple realms would use a shared group of functions from a single realm