How does Google\'s API make cross-domain requests back to Google, when it\'s on your website?
The accepted answer is wrong. Ben is correct. Below is the actually iframe node pulled off a page using the Google API JavaScript Client.
Basic summary of how this works is here: http://ternarylabs.com/2011/03/27/secure-cross-domain-iframe-communication/. On modern browsers they utilize HTML postMessage to achieve communication, and on older browsers, they use a neat multiple-iframe-urlhash-read+write-combination hack. Ternary Labs have made a library which abstracts all the hacky stuff out, essentially giving you postMessage on all browsers.
One day I'll build ontop of this library to simplify cross-domain REST APIs...
Edit: That day has come and XDomain is here - https://github.com/jpillora/xdomain