Jacek Caban (@jacek) commented about dlls/mshtml/xmlhttprequest.c:
*p = NULL; return S_OK; }
if(!This->window->base.outer_window || !This->window->base.outer_window->browser)
hres = E_UNEXPECTED;
else
hres = create_document_node(nsdoc, This->window->base.outer_window->browser, NULL, This->window,
dispex_compat_mode(&This->window->event_target.dispex), &doc); nsIDOMDocument_Release(nsdoc);
if(FAILED(hres))
return hres;
/* make sure dispex info is initialized */
dispex_compat_mode(&doc->node.event_target.dispex);
We have the same in `DOMImplementation`. We could move it to `create_document_node` when NULL window is passed, we always want it in such cases.