Commit d538e86a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use variant_to_nsstr in IHTMLDOMNode3::put_textContent.

parent 15933644
......@@ -1245,12 +1245,7 @@ static HRESULT WINAPI HTMLDOMNode3_put_textContent(IHTMLDOMNode3 *iface, VARIANT
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
if(V_VT(&v) != VT_BSTR) {
FIXME("unsupported argument %s\n", debugstr_variant(&v));
return E_NOTIMPL;
}
nsAString_Init(&nsstr, V_BSTR(&v));
variant_to_nsstr(&v, FALSE, &nsstr);
nsres = nsIDOMNode_SetTextContent(This->nsnode, &nsstr);
nsAString_Finish(&nsstr);
if(NS_FAILED(nsres)) {
......
......@@ -77,6 +77,11 @@ function test_textContent() {
ok(div.textContent === "", "div.textContent = " + div.textContent);
ok(div.childNodes.length === 0, "div.childNodes.length = " + div.childNodes.length);
div.textContent = null;
ok(div.textContent === "", "div.textContent = " + div.textContent);
div.textContent = 11;
ok(div.textContent === "11", "div.textContent = " + div.textContent);
ok(document.textContent === null, "document.textContent = " + document.textContent);
next_test();
......
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