diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 18a652e0df1..60fd94e3d44 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 13de60ff4d6..23b3a572820 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);