Update sandbox.js

Cross-browser version...