In order to complete a relative URL, we need a Document. Fix this by giving XMLHttpRequest a pointer to its window object. Then we can go from the window to the document, and then we're home free. :^)