diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c
index a42b73ae57d..254ebf8b334 100644
--- a/dlls/mshtml/htmlelem2.c
+++ b/dlls/mshtml/htmlelem2.c
@@ -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);
}
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index f3d23bd1021..2ea0e5df72f 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -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)