Platforms to show: All Mac Windows Linux Cross-Platform
JavaScript
Execute JavaScript without HTMLViewer on Mac.
- Classes
- class JavaScriptDateComponentsMBS
- property DateTimeValue as DateTime
- property DateValue as Date
- property Day as Integer
- property Hour as Integer
- property Millisecond as Integer
- property Minute as Integer
- property Month as Integer
- property Second as Integer
- property SQLDateTime as String
- property WeekDay as Integer
- property Year as Integer
- class JavaScriptEngineExceptionMBS
- class JavaScriptEngineMBS
- method AddFunction(Name as String, JavaScript as String, FileName as String = "")
- method CallFunction(Name as String, ParamArray Params as Variant) as Variant
- method CallFunction(Name as String, Params() as Variant) as Variant
- method CallFunctionMT(Name as String, ParamArray Params as Variant) as Variant
- method CallFunctionMT(Name as String, Params() as Variant) as Variant
- method DateComponentsToTime(date as JavaScriptDateComponentsMBS) as Double
- method Destructor
- method Evaluate(JavaScript as String) as Variant
- method EvaluateMT(JavaScript as String) as Variant
- method EvaluateToString(JavaScript as String) as String
- method InitModules
- method LoadFunction(Name as String, Data as Memoryblock) as Boolean
- method Now as Double
- method RegisterFunction(Name as String, theDelegate as JavaScriptEngineDelegateMBS, ArgCount as Integer = -1, tag as Variant = nil)
- method SaveFunction(Name as String) as MemoryBlock
- method TimeToDateComponents(time as Double) as JavaScriptDateComponentsMBS
- property Handle as Integer
- property MemoryBlocks as Dictionary
- property ObjectCount as Integer
- property StringCount as Integer
- property GlobalMemoryBlock(PropertyName as String) as MemoryBlock
- property GlobalProperty(PropertyName as String) as Variant
- property GlobalPropertyJSON(PropertyName as String) as String
- event Input(values() as Variant) as Variant
- event Print(values() as Variant)
- delegate JavaScriptEngineDelegateMBS(Name as String, Params() as Variant, tag as Variant) as Variant
- class JSClassMBS
- method Constructor
- method NewObject as JSObjectMBS
- property context as JSContextMBS
- property Handle as Integer
- property Tag as Variant
- class JSContextMBS
- 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
- shared method LoadLibrary(File as folderItem) as boolean
- shared method LoadLibrary(Path as String) as boolean
- 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
- shared property Available as Boolean
- property globalObject as JSObjectMBS
- property Handle as Integer
- shared property LibraryError as String
- property Name as String
- property Tag as Variant
- event FunctionCalled(functionObject as JSObjectMBS, thisObject as JSObjectMBS, arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
- class JSObjectMBS
- method CallAsConstructor(arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
- method CallAsFunction(thisObject as JSValueMBS, arguments() as JSValueMBS, byref JSException as JSValueMBS) as JSValueMBS
- method Constructor
- method DeleteProperty(name as string, byref JSException as JSValueMBS) as boolean
- method GetProperty(name as string, byref JSException as JSValueMBS) as JSValueMBS
- method GetPropertyAtIndex(propertyIndex as Integer, byref JSException as JSValueMBS) as JSValueMBS
- method HasProperty(name as string) as boolean
- method PropertyNames as String()
- method SetProperty(name as string, value as JSValueMBS, byref JSException as JSValueMBS)
- method SetPropertyAtIndex(propertyIndex as Integer, value as JSValueMBS, byref JSException as JSValueMBS)
- property isConstructor as Boolean
- property isFunction as Boolean
- property Prototype as JSValueMBS
- class JSValueMBS
- method Constructor
- method DoubleValue(byref JSException as JSValueMBS) as Double
- method IsEqual(OtherValue as JSValueMBS, byref JSException as JSValueMBS) as boolean
- method IsInstanceOfConstructor(ConstructorFunction as JSObjectMBS, byref JSException as JSValueMBS) as boolean
- method IsObjectOfClass(ClassObject as JSValueMBS) as boolean
- method IsStrictEqual(OtherValue as JSValueMBS) as boolean
- method JSONString(indent as Integer = 0, byref JSException as JSValueMBS) as string
- method ObjectValue(byref JSException as JSValueMBS) as JSValueMBS
- method StringValue(byref JSException as JSValueMBS) as string
- property booleanValue as Boolean
- property context as JSContextMBS
- property doubleValue as Double
- property Handle as Integer
- property isArray as Boolean
- property isBoolean as Boolean
- property isDate as Boolean
- property isNull as Boolean
- property isNumber as Boolean
- property isObject as Boolean
- property isString as Boolean
- property isUndefined as Boolean
- property JSONString as string
- property StringValue as String
- property Tag as Variant
- property Type as Integer
- class JavaScriptDateComponentsMBS
- Blog Entries
Release notes
- Version 24.0
- Improved JavaScriptEngineMBS class to handle arrays of Int32, Int64, Double, Single, Boolean, Color, String and Currency for conversion from Variant to JavaScript.
- 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.
- Version 22.2
- Updated DukTape library for JavaScriptEngineMBS class to version 2.7.
- Version 21.2
- Added InitModules method for JavaScriptEngineMBS class.
- Fixed error handling in JavaScriptEngineMBS class, broken in v21.1.
- Version 21.1
- Updated DukTape library for JavaScriptEngineMBS class to version 2.6.
- Version 20.5
- Added code to detect if variant is unsigned, so we can handle UInt32/UInt64 correctly in BigNumberMBS, JavaScriptEngineMBS, SQLPreparedStatementMBS and SQLCommandMBS, SQLValueMBS, and JSONMBS classes and in CFDictionaryMBS/NSDictionary conversion.
- Version 20.2
- Fixed RegisterFunction in JavaScriptEngineMBS class for non MT usage.
- Version 20.1
- Added DateComponentsToTime, TimeToDateComponents and Now methods to JavaScriptEngineMBS class.
- Added EvaluateMT and CallFunctionMT methods to JavaScriptEngineMBS class.
- Added GlobalMemoryBlock property and MemoryBlocks dictionary to JavaScriptEngineMBS class.
- Added JavaScriptDateComponentsMBS class.
- Added ObjectCount and StringCount properties to JavaScriptEngineMBS class.
- Improved JavaScriptEngineMBS to accept Memoryblocks passed as buffers to JavaScript. JavaScript code can work on memoryblock and later you pass it back to Xojo.
- Version 20.0
- Added JavaScriptEngineMBS class with DukTape JavaScript engine.
The items on this page are in the following plugins: MBS MacFrameworks Plugin, MBS Tools Plugin.