-
Notifications
You must be signed in to change notification settings - Fork 49
How to upgrade applications to version 3.X
Now you can implement your own version of the JsEngineSwitcher
class. To do this, you must create a class, that implements the IJsEngineSwitcher
interface and assign an instance of this class to the Current
property (this property should be used instead of the Instance
property) of JsEngineSwitcher
class:
JsEngineSwitcher.Current = new MyJsEngineSwitcher();
Because of appearance of this feature, you need to make changes in the source code of your applications: change the type of variables, parameters or properties from JsEngineSwitcher
to IJsEngineSwitcher
.
In IJsEngine
interface was added SupportsScriptInterruption
property and Interrupt
method. Since not all JS engines support ability to interrupt execution of the script, then before calling of Interrupt
method should always check the value of SupportsScriptInterruption
property:
if (engine.SupportsScriptInterruption)
{
engine.Interrupt();
}
After calling of the Interrupt
method, execution of scripts ends with an error, therefore you should catch the JsScriptInterruptedException
exception (or catch a more common exception - JsException
).
JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64 package has been replaced by the JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64 package.
ICU-57 library was embedded into the libChakraCore.so
and libChakraCore.dylib
assemblies (because of this, assemblies sizes is increased by 2,5 times).
- Registration of JS engines
- Creating instances of JS engines
- JS engines
- Upgrade guides
- Additional reading and resources