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

mshtml: Moved script mode out of get_script_host to allow exec_script calls in Gecko script mode.

parent 402c8756
......@@ -795,11 +795,6 @@ static ScriptHost *get_script_host(HTMLWindow *window, const GUID *guid)
{
ScriptHost *iter;
if(IsEqualGUID(&CLSID_JScript, guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
TRACE("Ignoring JScript\n");
return NULL;
}
LIST_FOR_EACH_ENTRY(iter, &window->script_hosts, ScriptHost, entry) {
if(IsEqualGUID(guid, &iter->guid))
return iter;
......@@ -818,6 +813,11 @@ void doc_insert_script(HTMLWindow *window, nsIDOMHTMLScriptElement *nsscript)
return;
}
if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
TRACE("Ignoring JScript\n");
return;
}
script_host = get_script_host(window, &guid);
if(!script_host)
return;
......@@ -859,6 +859,11 @@ IDispatch *script_parse_event(HTMLWindow *window, LPCWSTR text)
ptr = text;
}
if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
TRACE("Ignoring JScript\n");
return NULL;
}
script_host = get_script_host(window, &guid);
if(!script_host || !script_host->parse_proc)
return NULL;
......
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