Commit f91e71d7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added onreadystatechange event support.

parent a369d5e7
......@@ -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);
}
......
......@@ -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)
......
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