Platforms to show: All Mac Windows Linux Cross-Platform

JSContextMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class JavaScript MBS MacFrameworks Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for a javascript execution context.
Example
Var c as new JSContextMBS
Var e as JSValueMBS
Var v as JSValueMBS = c.EvaluateScript("1+2", "", nil, e)

if e <> nil then
// show error
MsgBox e.StringValue
else
// show result
MsgBox str(v.doubleValue)
end if

This is the JavaScript engine used for WebKit, e.g. Safari.
See also JavaScriptEngineMBS class for cross platform projects.

Updated for version 23.1 to work on Windows and Linux if you have a JavaScriptCore library to load.

This class has no sub classes.

Blog Entries

Release notes

  • Version 25.2
    • Added ShouldTerminate event and SetExecutionTimeLimit method to JSContextMBS class.
  • Version 24.2
  • Version 23.1
    • Added LoadLibrary, LibraryError and Available to JSContextMBS class.
    • Added support for JSContextMBS class to work on Windows and Linux if you provide a JavaScriptEngine library file to load.

Some properties using for this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


JSClassMBS   -   JSObjectMBS


The biggest plugin in space...