mshtml: Implement data
getter for MessageEvent objs.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
69d4be9ff0
commit
266ac9a809
2 changed files with 16 additions and 3 deletions
|
@ -1831,11 +1831,19 @@ static HRESULT WINAPI HTMLEventObj5_put_data(IHTMLEventObj5 *iface, BSTR v)
|
||||||
static HRESULT WINAPI HTMLEventObj5_get_data(IHTMLEventObj5 *iface, BSTR *p)
|
static HRESULT WINAPI HTMLEventObj5_get_data(IHTMLEventObj5 *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLEventObj *This = impl_from_IHTMLEventObj5(iface);
|
HTMLEventObj *This = impl_from_IHTMLEventObj5(iface);
|
||||||
|
IDOMMessageEvent *message_event;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
*p = NULL;
|
if(!This->event || FAILED(IDOMEvent_QueryInterface(&This->event->IDOMEvent_iface, &IID_IDOMMessageEvent, (void**)&message_event))) {
|
||||||
return S_OK;
|
*p = NULL;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
hres = IDOMMessageEvent_get_data(message_event, p);
|
||||||
|
IDOMMessageEvent_Release(message_event);
|
||||||
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLEventObj5_get_source(IHTMLEventObj5 *iface, IDispatch **p)
|
static HRESULT WINAPI HTMLEventObj5_get_source(IHTMLEventObj5 *iface, IDispatch **p)
|
||||||
|
|
|
@ -1537,6 +1537,11 @@ static HRESULT WINAPI onmessage(IDispatchEx *iface, DISPID id, LCID lcid, WORD w
|
||||||
ok(hres == S_OK, "get_url failed: %08lx\n", hres);
|
ok(hres == S_OK, "get_url failed: %08lx\n", hres);
|
||||||
ok(!bstr, "url = %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "url = %s\n", wine_dbgstr_w(bstr));
|
||||||
|
|
||||||
|
hres = IHTMLEventObj5_get_data(event_obj5, &bstr);
|
||||||
|
ok(hres == S_OK, "get_data failed: %08lx\n", hres);
|
||||||
|
ok(!wcscmp(bstr, L"foobar"), "data = %s\n", wine_dbgstr_w(bstr));
|
||||||
|
SysFreeString(bstr);
|
||||||
|
|
||||||
hres = IHTMLEventObj5_get_source(event_obj5, &disp);
|
hres = IHTMLEventObj5_get_source(event_obj5, &disp);
|
||||||
ok(hres == S_OK, "get_source failed: %08lx\n", hres);
|
ok(hres == S_OK, "get_source failed: %08lx\n", hres);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue