Commit 7ad4aeb7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for IHTMLDOMAttribute2::get_value on detached attributes.

parent a3ab8d67
......@@ -310,12 +310,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_value(IHTMLDOMAttribute2 *iface, BST
TRACE("(%p)->(%p)\n", This, p);
if(!This->elem) {
FIXME("NULL This->elem\n");
return E_UNEXPECTED;
}
V_VT(&val) = VT_EMPTY;
if(This->elem)
hres = get_elem_attr_value_by_dispid(This->elem, This->dispid, &val);
else
hres = VariantCopy(&val, &This->value);
if(SUCCEEDED(hres))
hres = attr_value_to_string(&val);
if(FAILED(hres))
......
......@@ -8610,11 +8610,18 @@ static void test_attr(IHTMLDocument2 *doc, IHTMLElement *elem)
get_attr_node_value(attr, &v, VT_I4);
ok(V_I4(&v) == 1, "nodeValue = %d\n", V_I4(&v));
test_attr_value(attr, "1");
V_VT(&v) = VT_EMPTY;
put_attr_node_value(attr, v);
get_attr_node_value(attr, &v, VT_EMPTY);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = a2bstr("testing");
put_attr_node_value(attr, v);
SysFreeString(V_BSTR(&v));
test_attr_value(attr, "testing");
IHTMLDOMAttribute_Release(attr);
}
......
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