mshtml: Added IHTMLDOMNode3::get_textContent implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-07-20 18:11:29 +02:00 committed by Alexandre Julliard
parent fd44c7ac26
commit c8cab0d3f6
2 changed files with 22 additions and 3 deletions

View File

@ -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)

View File

@ -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
];