Module: wine Branch: master Commit: abd764674a39fbed5ac8555031bed52f1dc8b81e URL: http://source.winehq.org/git/wine.git/?a=commit;h=abd764674a39fbed5ac8555031...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Oct 29 19:15:02 2006 +0100
mshtml: Added put_innerHTML implementation.
---
dlls/mshtml/htmlelem.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 4fad4ec..5a19805 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -531,8 +531,28 @@ static HRESULT WINAPI HTMLElement_get_of static HRESULT WINAPI HTMLElement_put_innerHTML(IHTMLElement *iface, BSTR v) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + nsAString html_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres); + return E_FAIL; + } + + nsAString_Init(&html_str, v); + nsres = nsIDOMNSHTMLElement_SetInnerHTML(nselem, &html_str); + nsAString_Finish(&html_str); + + if(NS_FAILED(nsres)) { + FIXME("SetInnerHtml failed %08x\n", nsres); + return E_FAIL; + } + + return S_OK; }
static HRESULT WINAPI HTMLElement_get_innerHTML(IHTMLElement *iface, BSTR *p)