How Google +1 Widgets "Break Out" of their IFRAMEs
stackoverflow.com
stackoverflow.com
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
Given this is the code you paste on the page I think it is pretty obvious to anyone who bothers to look.The CSRF information is great however!
As the first SO response points out, the widget is JavaScript code that runs in the host page, so it can easily create and manipulate any kind of DOM element anywhere in that page. Of course there may be iframes among those elements, but the JS code isn't limited to that.
But yeah, since it creates the illusion of breaking out, the submission title has the phrase in quotes.
Once you do that you can do anything to the page, and you can also use one of several methods to have this script communicate with scripts inside the iframes that it creates.
Interesting tidbit: HTML5 suggests the `seamless` attribute for <iframe> elements, which would cause those CSS styles to actually affect the contents of the <iframe> (and some other changes, like links affecting the location of the parent window). http://www.w3.org/TR/html5/the-iframe-element.html#the-ifram...
(Of course, you meant to say “when you insert typical content DOM nodes”, not “insert Javascript”.)
I wonder how much extra bandwidth Facebook has wasted worldwide by doing this? Twitter allows caching for 30 mins at least, good enough for back/forward caching to be useful.