mshtml: Added IHTMLDocument2::createElement implementation.
This commit is contained in:
parent
fdf676ac17
commit
f13c5685b5
|
@ -878,8 +878,31 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
|
||||||
IHTMLElement **newElem)
|
IHTMLElement **newElem)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = HTMLDOC_THIS(iface);
|
HTMLDocument *This = HTMLDOC_THIS(iface);
|
||||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(eTag), newElem);
|
nsIDOMDocument *nsdoc;
|
||||||
return E_NOTIMPL;
|
nsIDOMElement *nselem;
|
||||||
|
HTMLElement *elem;
|
||||||
|
nsAString tag_str;
|
||||||
|
nsresult nsres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%s %p)\n", This, debugstr_w(eTag), newElem);
|
||||||
|
|
||||||
|
nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
|
||||||
|
|
||||||
|
nsAString_Init(&tag_str, eTag);
|
||||||
|
nsres = nsIDOMDocument_CreateElement(nsdoc, &tag_str, &nselem);
|
||||||
|
nsAString_Finish(&tag_str);
|
||||||
|
nsIDOMDocument_Release(nsdoc);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("CreateElement failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
elem = HTMLElement_Create(This, (nsIDOMNode*)nselem);
|
||||||
|
nsIDOMElement_Release(nselem);
|
||||||
|
|
||||||
|
*newElem = HTMLELEM(elem);
|
||||||
|
IHTMLElement_AddRef(HTMLELEM(elem));
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLDocument_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
|
static HRESULT WINAPI HTMLDocument_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
|
||||||
|
|
Loading…
Reference in New Issue