mshtml: Set script engine state to SCRIPTSTATE_CONNECTED when page is loaded.
This commit is contained in:
parent
0db1b86c17
commit
ac6cbb79af
|
@ -450,6 +450,7 @@ HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
|
|||
void release_nodes(HTMLDocument*);
|
||||
|
||||
void release_script_hosts(HTMLDocument*);
|
||||
void connect_scripts(HTMLDocument*);
|
||||
void doc_insert_script(HTMLDocument*,nsIDOMHTMLScriptElement*);
|
||||
|
||||
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
|
||||
|
|
|
@ -136,6 +136,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
|
|||
if(!This->doc)
|
||||
return NS_OK;
|
||||
|
||||
connect_scripts(This->doc);
|
||||
setup_nswindow(This->doc->window);
|
||||
|
||||
if(This->editor_controller) {
|
||||
|
|
|
@ -171,6 +171,16 @@ static void release_script_engine(ScriptHost *This)
|
|||
This->script_state = SCRIPTSTATE_UNINITIALIZED;
|
||||
}
|
||||
|
||||
void connect_scripts(HTMLDocument *doc)
|
||||
{
|
||||
ScriptHost *iter;
|
||||
|
||||
LIST_FOR_EACH_ENTRY(iter, &doc->script_hosts, ScriptHost, entry) {
|
||||
if(iter->script_state == SCRIPTSTATE_STARTED)
|
||||
IActiveScript_SetScriptState(iter->script, SCRIPTSTATE_CONNECTED);
|
||||
}
|
||||
}
|
||||
|
||||
#define ACTSCPSITE_THIS(iface) DEFINE_THIS(ScriptHost, ActiveScriptSite, iface)
|
||||
|
||||
static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv)
|
||||
|
|
Loading…
Reference in New Issue