only use XHR for no document object and not rhino