Add docs for is_xhr
Add tests for is_xhr