JSContextMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
JSContextMBS class
The class for a javascript execution context.
Example
dim c as new JSContextMBSdim e as JSValueMBS dim v as JSValueMBS = c.EvaluateScript("1+2" , "" , nil , e)if e <> nil then // show error MsgBox e.StringValueelse // show result MsgBox str(v.doubleValue)end if
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
2 shared properties
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
This class has no sub classes.
Some properties using for this class:
Some examples using this class:
Blog Entries
Release notes
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 .
JSClassMBS
-
JSObjectMBS