Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chromakode/adsandbox

Batched sandboxed ad demonstration
https://github.com/chromakode/adsandbox

Last synced: 23 days ago
JSON representation

Batched sandboxed ad demonstration

Awesome Lists containing this project

README

        

# Simple sandboxed multiple-frame ads

This code demonstrates a method of populating an arbitrary number of sandboxed ads from a single iframe.

Tested to work on IE6+, Firefox 3+, Chrome, Opera 11+.

An initial iframe "ad_main" is loaded, which contains information about all ads to be displayed on the page. The "ad_main" frame signals the parent page that "child" ad frames must be created via `postMessage` or a cross-domain iframe as a fallback. Child ad frames load a document containing a script that fetches their contents from the JavaScript scope of "ad_main".

To run this demo, you should create localhost aliases for "home.local" and "ads.local" in your `/etc/hosts` file (or similar):

127.0.0.1 home.local ads.local