gregersrygg/crapLoader — pull request #2 by andykent (2012-05-21 15:41:45+00:00)
Title: added support for crapLoader.runInSandbox() 

`crapLoader.runInSandbox()` allows you to use crapLoader in situations where you
have a dangerous function to execute rather than an external script to
require.

I personally had a need for this when integrating with ADTech and their evil Add-ons. Basically after you've loaded an add higher up the page you can call `ADTECH_showAd()` to show an additional companion ad, (which is basically another chain of document.writes along with some logic).

By adding this function I was able to load the first ad and then add a 'success' callback which then called `craploader.runInContext('addon-id', ADTECH_showAd);`

It seems to work for me, I haven't tested it very extensively but I didn't change any of the existing functions at all so I think it should be quite safe to merge. I also updated the readme but feel free to drop that if it's not to your liking.