let’s say that you have a script that needs to run on a page that overrides javascript’s JSON.stringify, how would you ensure that your code would use the original stringify not the overridden one?
let’s say that you have a script that needs to run on a page
Share
While I would opt for one of the other answers, here is a solution for the case when:
Here is then a hack:
contentWindowproperty of the IFRAME element; this should then contain the original (or “a new untouched”) JSON object and thus the original JSON.stringify function.Here is the jsfiddle