mshtml: Added onreadystatechange event support.

This commit is contained in:
Jacek Caban 2009-11-30 18:02:44 +01:00 committed by Alexandre Julliard
parent a369d5e733
commit f91e71d7ce
2 changed files with 6 additions and 2 deletions

View File

@ -689,7 +689,7 @@ static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface,
{
HTMLElement *This = HTMLELEM2_THIS(iface);
FIXME("(%p)->(%s): semi-stub\n", This, debugstr_variant(&v));
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_node_event(&This->node, EVENTID_READYSTATECHANGE, &v);
}

View File

@ -36,6 +36,7 @@
#include "wine/unicode.h"
#include "mshtml_private.h"
#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
@ -274,8 +275,11 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc)
void set_ready_state(HTMLWindow *window, READYSTATE readystate)
{
window->readystate = readystate;
if(window->doc_obj->basedoc.window == window)
if(window->doc_obj && window->doc_obj->basedoc.window == window)
call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE);
if(window->frame_element)
fire_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE,
window->frame_element->element.node.nsnode, NULL);
}
static HRESULT get_doc_string(HTMLDocumentNode *This, char **str)