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:
parent
fd44c7ac26
commit
c8cab0d3f6
|
@ -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
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue