diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c
index 7365b9ea63f..82ded4d8a8e 100644
--- a/dlls/mshtml/htmlattr.c
+++ b/dlls/mshtml/htmlattr.c
@@ -285,8 +285,10 @@ static HRESULT WINAPI HTMLDOMAttribute2_Invoke(IHTMLDOMAttribute2 *iface, DISPID
static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p)
{
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLDOMAttribute_get_nodeName(&This->IHTMLDOMAttribute_iface, p);
}
static HRESULT WINAPI HTMLDOMAttribute2_put_value(IHTMLDOMAttribute2 *iface, BSTR v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 1b1e6771ec9..8f78c8da17f 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3614,6 +3614,7 @@ static void test_dynamic_properties(IHTMLElement *elem)
#define test_attr_node_name(a,b) _test_attr_node_name(__LINE__,a,b)
static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const WCHAR *exname)
{
+ IHTMLDOMAttribute2 *attr2 = _get_attr2_iface(line, (IUnknown*)attr);
BSTR str;
HRESULT hres;
@@ -3621,6 +3622,13 @@ static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const W
ok_(__FILE__,line)(hres == S_OK, "get_nodeName failed: %08lx\n", hres);
ok_(__FILE__,line)(!lstrcmpW(str, exname), "node name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname));
SysFreeString(str);
+
+ hres = IHTMLDOMAttribute2_get_name(attr2, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08lx\n", hres);
+ ok_(__FILE__,line)(!lstrcmpW(str, exname), "name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname));
+ SysFreeString(str);
+
+ IHTMLDOMAttribute2_Release(attr2);
}
#define test_attr_parent(a) _test_attr_parent(__LINE__,a)