Pass location-object to fix XHR in sandbox

Pull request for #2