[PATCH 1/2] mshtml: Implement IHTMLScriptElement::get_htmlFor().
Nikolay Sivov
nsivov at codeweavers.com
Tue Jan 21 14:26:43 CST 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/mshtml/htmlscript.c | 10 ++++++++--
dlls/mshtml/tests/dom.c | 5 +++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c
index 18a652e0df..60fd94e3d4 100644
--- a/dlls/mshtml/htmlscript.c
+++ b/dlls/mshtml/htmlscript.c
@@ -157,8 +157,14 @@ static HRESULT WINAPI HTMLScriptElement_put_htmlFor(IHTMLScriptElement *iface, B
static HRESULT WINAPI HTMLScriptElement_get_htmlFor(IHTMLScriptElement *iface, BSTR *p)
{
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString html_str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&html_str, NULL);
+ nsres = nsIDOMHTMLScriptElement_GetHtmlFor(This->nsscript, &html_str);
+ return return_nsstr(nsres, &html_str, p);
}
static HRESULT WINAPI HTMLScriptElement_put_event(IHTMLScriptElement *iface, BSTR v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 13de60ff4d..23b3a57282 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -8834,6 +8834,11 @@ static void test_elems(IHTMLDocument2 *doc)
hres = IHTMLScriptElement_get_src(script, &str);
ok(hres == S_OK, "get_src failed: %08x\n", hres);
ok(!str, "src = %s\n", wine_dbgstr_w(str));
+
+ str = (BSTR)0xdeadbeef;
+ hres = IHTMLScriptElement_get_htmlFor(script, &str);
+ ok(hres == S_OK, "get_htmlFor failed: %08x\n", hres);
+ ok(!str, "htmlFor = %s\n", wine_dbgstr_w(str));
}
IHTMLScriptElement_Release(script);
--
2.24.1
More information about the wine-devel
mailing list