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

mshtml: Added IHTMLDOMNode3::get_textContent implementation.

parent fd44c7ac
......@@ -1248,8 +1248,14 @@ static HRESULT WINAPI HTMLDOMNode3_put_textContent(IHTMLDOMNode3 *iface, VARIANT
static HRESULT WINAPI HTMLDOMNode3_get_textContent(IHTMLDOMNode3 *iface, VARIANT *p)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
nsAString nsstr;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&nsstr, NULL);
nsres = nsIDOMNode_GetTextContent(This->nsnode, &nsstr);
return return_nsstr_variant(nsres, &nsstr, p);
}
static HRESULT WINAPI HTMLDOMNode3_isEqualNode(IHTMLDOMNode3 *iface, IHTMLDOMNode3 *otherNode, VARIANT_BOOL *isEqual)
......
......@@ -59,6 +59,19 @@ function test_input_selection() {
next_test();
}
function test_textContent() {
var text = document.createTextNode("test");
ok(text.textContent === "test", "text.textContent = " + text.textContent);
var div = document.createElement("div");
document.body.appendChild(div);
div.innerHTML = "abc<script>/* */</script><div>text</div>";
ok(div.textContent === "abc/* */text", "div.textContent = " + div.textContent);
next_test();
}
var tests = [
test_input_selection
test_input_selection,
test_textContent
];
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