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 |
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.
- 2 events
- event FunctionCalled(functionObject as JSObjectMBS, thisObject as JSObjectMBS, arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
- event ShouldTerminate as Boolean New in 25.2
- 4 properties
- property globalObject as JSObjectMBS
- property Handle as Integer
- property Name as String
- property Tag as Variant
- 2 shared properties
- shared property Available as Boolean
- shared property LibraryError as String
- 18 methods
- method CheckScriptSyntax(script as string, sourceURL as String, startingLineNumber as Integer = 1, byref JSException as JSValueMBS) as Boolean
- method Constructor
- method EvaluateScript(script as string, sourceURL as String, thisObject as JSValueMBS, startingLineNumber as Integer = 1, byref JSException as JSValueMBS) as JSValueMBS
- method GarbageCollect
- method NewArray(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSObjectMBS
- method NewDate(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSObjectMBS
- method NewError(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSObjectMBS
- method NewFunction(name as string) as JSObjectMBS
- method NewFunction(name as string, parameterNames() as string, Body as String, SourceURL as string = "", startingLineNumber as Integer = 0, byref JSException as JSValueMBS) as JSValueMBS
- method NewObject as JSObjectMBS
- method NewRegExp(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSObjectMBS
- method SetExecutionTimeLimit(limit as double) New in 25.2
- method valueWithBool(value as boolean) as JSValueMBS
- method valueWithDouble(value as Double) as JSValueMBS
- method valueWithJSON(JSON as string) as JSValueMBS
- method valueWithNull as JSValueMBS
- method valueWithString(value as string) as JSValueMBS
- method valueWithUndefined as JSValueMBS
- 2 shared methods
- shared method LoadLibrary(File as folderItem) as boolean
- shared method LoadLibrary(Path as String) as boolean
This class has no sub classes.
Blog Entries
- MBS Xojo Plugins, version 25.2pr7
- MBS Xojo Plugins, version 24.2pr4
- New in MBS Xojo Plugins in version 23.1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.1
- MBS Xojo Plugins, version 23.1pr1
Release notes
- Version 25.2
- Added ShouldTerminate event and SetExecutionTimeLimit method to JSContextMBS class.
- Version 24.2
- Improved thread safety for JSContextMBS class.
- 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:
- JSClassMBS.context as JSContextMBS
- JSValueMBS.context as JSContextMBS
Some examples using this class:
Some related classes:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
