From e370f4bf3a113d253b9fc85e3bac72975b9a6bb7 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 4 Apr 2012 15:08:38 +0200 Subject: [PATCH] mshtml: Added IHTMLWindow2::onerror semi-stub implementation. --- dlls/mshtml/htmlevent.c | 5 +++++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/htmlwindow.c | 12 ++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index cf2d808dac4..cfba560c449 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -68,6 +68,9 @@ static const WCHAR ondragW[] = {'o','n','d','r','a','g',0}; static const WCHAR dragstartW[] = {'d','r','a','g','s','t','a','r','t',0}; static const WCHAR ondragstartW[] = {'o','n','d','r','a','g','s','t','a','r','t',0}; +static const WCHAR errorW[] = {'e','r','r','o','r',0}; +static const WCHAR onerrorW[] = {'o','n','e','r','r','o','r',0}; + static const WCHAR focusW[] = {'f','o','c','u','s',0}; static const WCHAR onfocusW[] = {'o','n','f','o','c','u','s',0}; @@ -160,6 +163,8 @@ static const event_info_t event_info[] = { EVENT_CANCELABLE}, {dragstartW, ondragstartW, EVENTT_MOUSE, DISPID_EVMETH_ONDRAGSTART, EVENT_CANCELABLE}, + {errorW, onerrorW, EVENTT_NONE, DISPID_EVMETH_ONERROR, + 0}, {focusW, onfocusW, EVENTT_HTML, DISPID_EVMETH_ONFOCUS, EVENT_DEFAULTLISTENER}, {keydownW, onkeydownW, EVENTT_KEY, DISPID_EVMETH_ONKEYDOWN, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index b3ff251c66f..70056b39743 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -25,6 +25,7 @@ typedef enum { EVENTID_DBLCLICK, EVENTID_DRAG, EVENTID_DRAGSTART, + EVENTID_ERROR, EVENTID_FOCUS, EVENTID_KEYDOWN, EVENTID_KEYUP, diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 2bd5d7edf0f..294f551112d 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -971,15 +971,19 @@ static HRESULT WINAPI HTMLWindow2_get_onhelp(IHTMLWindow2 *iface, VARIANT *p) static HRESULT WINAPI HTMLWindow2_put_onerror(IHTMLWindow2 *iface, VARIANT v) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + + FIXME("(%p)->(%s) semi-stub\n", This, debugstr_variant(&v)); + + return set_window_event(This, EVENTID_ERROR, &v); } static HRESULT WINAPI HTMLWindow2_get_onerror(IHTMLWindow2 *iface, VARIANT *p) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_window_event(This, EVENTID_ERROR, p); } static HRESULT WINAPI HTMLWindow2_put_onresize(IHTMLWindow2 *iface, VARIANT v)