guardian / iframe-messenger

postMessage interface
Other
56 stars 9 forks source link

Do not access cross-origin parent window #13

Open mchv opened 8 years ago

mchv commented 8 years ago

The code seems to try to access parent window property:

var height = parseInt(document.body.offsetHeight, 10);

For instance on this article, it result an error message in the console:

iframeMessenger.js:157 Blocked a frame with origin "https://interactive.guim.co.uk" from accessing a frame with origin "https://www.theguardian.com". Protocols, domains, and ports must match.