Update sandbox.js

Is cross-browser compatible.