Commit 0d1309b7 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Forward toString to the document node.

parent cab7ce59
......@@ -2384,16 +2384,7 @@ HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onbeforeupdate, VARIANT)
HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onbeforeupdate, VARIANT*)
HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onerrorupdate, VARIANT)
HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onerrorupdate, VARIANT*)
static HRESULT WINAPI DocObjHTMLDocument2_toString(IHTMLDocument2 *iface, BSTR *String)
{
HTMLDocumentObj *This = impl_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, String);
return dispex_to_string(&This->dispex, String);
}
HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, toString, BSTR*)
HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument2, createStyleSheet, BSTR,LONG,IHTMLStyleSheet**)
static const IHTMLDocument2Vtbl DocObjHTMLDocument2Vtbl = {
......
......@@ -2786,6 +2786,13 @@ static void test_doc_obj(IHTMLDocument2 *doc)
CHECK_CALLED(docobj_onclick);
}
bstr = NULL;
hres = IHTMLDocument2_toString(doc, &bstr);
ok(hres == S_OK, "toString failed: %08lx\n", hres);
todo_wine_if(document_mode >= 9)
ok(!wcscmp(bstr, (document_mode < 9 ? L"[object]" : L"[object Document]")), "toString returned %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
/* Navigate to a different document mode page, checking using the same doc obj.
Test that it breaks COM rules, since IEventTarget is conditionally exposed.
All the events registered on the old doc node are also removed. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment