Commit 44223acc authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added VT_BSTR support to IHTMLWindow3::setTimeout.

Resend without test depending on JScript.
parent 6971db7e
...@@ -841,25 +841,44 @@ static HRESULT WINAPI HTMLWindow3_detachEvent(IHTMLWindow3 *iface, BSTR event, I ...@@ -841,25 +841,44 @@ static HRESULT WINAPI HTMLWindow3_detachEvent(IHTMLWindow3 *iface, BSTR event, I
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI HTMLWindow3_setTimeout(IHTMLWindow3 *iface, VARIANT *expression, long msec, static HRESULT window_set_timer(HTMLWindow *This, VARIANT *expr, long msec, VARIANT *language, long *timer_id)
VARIANT *language, long *timerID)
{ {
HTMLWindow *This = HTMLWINDOW3_THIS(iface); IDispatch *disp = NULL;
TRACE("(%p)->(%p(%d) %ld %p %p)\n", This, expression, V_VT(expression), msec, language, timerID);
switch(V_VT(expression)) { switch(V_VT(expr)) {
case VT_DISPATCH: case VT_DISPATCH:
*timerID = set_task_timer(This->doc, msec, V_DISPATCH(expression)); disp = V_DISPATCH(expr);
IDispatch_AddRef(disp);
break;
case VT_BSTR:
disp = script_parse_event(This->doc, V_BSTR(expr));
break; break;
default: default:
FIXME("unimplemented vt=%d\n", V_VT(expression)); FIXME("unimplemented vt=%d\n", V_VT(expr));
return E_NOTIMPL;
} }
if(!disp)
return E_FAIL;
*timer_id = set_task_timer(This->doc, msec, disp);
IDispatch_Release(disp);
return S_OK; return S_OK;
} }
static HRESULT WINAPI HTMLWindow3_setTimeout(IHTMLWindow3 *iface, VARIANT *expression, long msec,
VARIANT *language, long *timerID)
{
HTMLWindow *This = HTMLWINDOW3_THIS(iface);
TRACE("(%p)->(%p(%d) %ld %p %p)\n", This, expression, V_VT(expression), msec, language, timerID);
return window_set_timer(This, expression, msec, language, timerID);
}
static HRESULT WINAPI HTMLWindow3_setInterval(IHTMLWindow3 *iface, VARIANT *expression, long msec, static HRESULT WINAPI HTMLWindow3_setInterval(IHTMLWindow3 *iface, VARIANT *expression, long msec,
VARIANT *language, long *timerID) VARIANT *language, long *timerID)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment