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 |
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.
- event FunctionCalled(functionObject as JSObjectMBS, thisObject as JSObjectMBS, arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
- 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
- 17 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 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.
Some properties using for this class:
- JSClassMBS.context as JSContextMBS
- JSValueMBS.context as JSContextMBS
Some examples using this class:
Blog Entries
- 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 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.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.