Update sandbox.js

Fix for Safari & IE 9