Just playing with window.postMessage
for cross-domain messaging.
To run:
bundle
bundle exec rackup -p 1234
bundle exec rackup -p 4567 # to give you a different domain. or use a localhost alias.
Then visit http://localhost:1234/local-page.html?otherPort=4567
Alternatively, you can host these HTML files on your own server (without a Ruby web server).