mshtml: Implement HTMLDocument's toString using dispex_to_string.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2021-10-08 20:30:54 +03:00 committed by Alexandre Julliard
parent c05704c713
commit 6f78047199
2 changed files with 2 additions and 6 deletions

View file

@ -1703,12 +1703,7 @@ static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String)
TRACE("(%p)->(%p)\n", This, String);
if(!String)
return E_INVALIDARG;
*String = SysAllocString(L"[object]");
return *String ? S_OK : E_OUTOFMEMORY;
return dispex_to_string(&This->doc_node->node.event_target.dispex, String);
}
static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,

View file

@ -210,6 +210,7 @@ sync_test("builtin_toString", function() {
if(clientRects) test("clientRect", clientRects[0], "ClientRect");
if(clientRects) test("clientRects", clientRects, "ClientRectList");
if(currentStyle) test("currentStyle", currentStyle, "MSCurrentStyleCSSProperties");
if(v >= 11 /* todo_wine */) test("document", document, v < 11 ? "Document" : "HTMLDocument");
test("elements", document.getElementsByTagName("body"), "HTMLCollection");
test("history", window.history, "History");
test("implementation", document.implementation, "DOMImplementation");