Jacek Caban (@jacek) commented about dlls/mshtml/tests/dom.c:
- div = test_create_elem(doc, L"DIV");
- test_elem_source_index(div, -1);
- test_node_append_child((IUnknown*)html, (IUnknown*)div);
- test_elem_source_index(div, 2);
- body = test_create_elem(doc, L"BODY");
- test_elem_source_index(body, -1);
- test_node_append_child((IUnknown*)div, (IUnknown*)body);
- test_elem_source_index(body, 3);
- IHTMLElement_Release(body);
- IHTMLElement_Release(div);
- IHTMLElement_Release(html);
- hres = IHTMLDocument2_get_body(frag, &body);
- ok(hres == S_OK, "get_body failed: %08lx\n", hres);
- todo_wine ok(body != NULL, "body == NULL\n");
It would be interesting to compare body to previously created element to make sure it's the same object. This will probably need `iface_cmp` (native seems to use some relay interfaces, we don't have that).