Commit 6e292a74 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Introduce ES6 JavaScript mode and use it in IE11 compat mode.

parent 08c6114f
......@@ -42,9 +42,10 @@
#define SCRIPTLANGUAGEVERSION_HTML 0x400
/*
* This is Wine jscript extension for ES5 compatible mode. Allowed only in HTML mode.
* This is Wine jscript extension for ES5 and ES6 compatible mode. Allowed only in HTML mode.
*/
#define SCRIPTLANGUAGEVERSION_ES5 0x102
#define SCRIPTLANGUAGEVERSION_ES6 0x103
typedef struct _jsval_t jsval_t;
typedef struct _jsstr_t jsstr_t;
......
......@@ -66,6 +66,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
/* See jscript.h in jscript.dll. */
#define SCRIPTLANGUAGEVERSION_HTML 0x400
#define SCRIPTLANGUAGEVERSION_ES5 0x102
#define SCRIPTLANGUAGEVERSION_ES6 0x103
struct ScriptHost {
IActiveScriptSite IActiveScriptSite_iface;
......@@ -154,7 +155,9 @@ static BOOL init_script_engine(ScriptHost *script_host)
compat_mode = lock_document_mode(script_host->window->doc);
script_mode = compat_mode < COMPAT_MODE_IE8 ? SCRIPTLANGUAGEVERSION_5_7 : SCRIPTLANGUAGEVERSION_5_8;
if(IsEqualGUID(&script_host->guid, &CLSID_JScript)) {
if(compat_mode >= COMPAT_MODE_IE9)
if(compat_mode >= COMPAT_MODE_IE11)
script_mode = SCRIPTLANGUAGEVERSION_ES6;
else if(compat_mode >= COMPAT_MODE_IE9)
script_mode = SCRIPTLANGUAGEVERSION_ES5;
script_mode |= SCRIPTLANGUAGEVERSION_HTML;
}
......
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