For some reason in IE8, I couldn’t access the built-in JSON global object in Javascript within an iframe
. I’m not sure if this issue exists in other browsers, but the fix is to specify the top
property first, and then the JSON object:
top.JSON.stringify(({json: 'object'}))
See jquery.com