Commit 2c06b800 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added beginning of getAttribute implementation.

parent 26b9c5e0
...@@ -142,9 +142,33 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr ...@@ -142,9 +142,33 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
LONG lFlags, VARIANT *AttributeValue) LONG lFlags, VARIANT *AttributeValue)
{ {
HTMLElement *This = HTMLELEM_THIS(iface); HTMLElement *This = HTMLELEM_THIS(iface);
FIXME("(%p)->(%s %08lx %p)\n", This, debugstr_w(strAttributeName), lFlags, nsAString attr_str;
AttributeValue); nsAString value_str;
return E_NOTIMPL; const PRUnichar *value;
nsresult nsres;
HRESULT hres = S_OK;
WARN("(%p)->(%s %08lx %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
nsAString_Init(&attr_str, strAttributeName);
nsAString_Init(&value_str, NULL);
nsres = nsIDOMHTMLElement_GetAttribute(This->nselem, &attr_str, &value_str);
nsAString_Finish(&attr_str);
if(NS_SUCCEEDED(nsres)) {
nsAString_GetData(&value_str, &value, NULL);
V_VT(AttributeValue) = VT_BSTR;
V_BSTR(AttributeValue) = SysAllocString(value);;
TRACE("attr_value=%s\n", debugstr_w(V_BSTR(AttributeValue)));
}else {
ERR("GetAttribute failed: %08lx\n", nsres);
hres = E_FAIL;
}
nsAString_Finish(&value_str);
return hres;
} }
static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strAttributeName, static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strAttributeName,
......
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