mshtml: Added IHTMLWindow2::onunload property implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-05-26 16:16:09 +02:00 committed by Alexandre Julliard
parent 8abd37637a
commit 7d2bba4647
3 changed files with 15 additions and 5 deletions

View file

@ -141,6 +141,9 @@ static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','
static const WCHAR submitW[] = {'s','u','b','m','i','t',0};
static const WCHAR onsubmitW[] = {'o','n','s','u','b','m','i','t',0};
static const WCHAR unloadW[] = {'u','n','l','o','a','d',0};
static const WCHAR onunloadW[] = {'o','n','u','n','l','o','a','d',0};
static const WCHAR HTMLEventsW[] = {'H','T','M','L','E','v','e','n','t','s',0};
static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0};
static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0};
@ -239,7 +242,9 @@ static const event_info_t event_info[] = {
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
EVENT_CANCELABLE},
{submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE|EVENT_HASDEFAULTHANDLERS}
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE|EVENT_HASDEFAULTHANDLERS},
{unloadW, onunloadW, EVENTT_HTML, DISPID_EVMETH_ONUNLOAD,
EVENT_FIXME}
};
eventid_t str_to_eid(LPCWSTR str)

View file

@ -49,6 +49,7 @@ typedef enum {
EVENTID_SCROLL,
EVENTID_SELECTSTART,
EVENTID_SUBMIT,
EVENTID_UNLOAD,
EVENTID_LAST
} eventid_t;

View file

@ -1128,15 +1128,19 @@ static HRESULT WINAPI HTMLWindow2_get_onbeforeunload(IHTMLWindow2 *iface, VARIAN
static HRESULT WINAPI HTMLWindow2_put_onunload(IHTMLWindow2 *iface, VARIANT v)
{
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_window_event(This, EVENTID_UNLOAD, &v);
}
static HRESULT WINAPI HTMLWindow2_get_onunload(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_UNLOAD, p);
}
static HRESULT WINAPI HTMLWindow2_put_onhelp(IHTMLWindow2 *iface, VARIANT v)