An IActiveScript instance that implements the IE9 JavaScript engine ("Chakra") runs in Quirks mode

By creating an instance of IActiveScript based on the CLSID "{16d51579-a30b-4c8b-a276-0ff4dc41e755}" (as described here ), we get IE9 JavaScript that works in Quirks mode. Unfortunately, Quirks mode does not support ECMAScript 5.

Does anyone know how to create an instance of IActiveScript for Chakra that works in IE9 standards mode?

+5
source share
2 answers

Configure IActiveScripton IActiveScriptProperty, then call SetPropertyusing it SCRIPTPROP_INVOKEVERSIONINGon it as follows:

CComQIPtr<IActiveScriptProperty> property = jscript;
CComVariant version(SCRIPTLANGUAGEVERSION_5_8 + 1); // = 3
hr = property->SetProperty(SCRIPTPROP_INVOKEVERSIONING, nullptr, &version);
+1
source

, CLSID - 16d51579-a30b-4c8b-a276-0ff4dc41e755. Script JScript- , , #.

0

All Articles